Edit report at http://bugs.php.net/bug.php?id=51424&edit=1

 ID:               51424
 User updated by:  laacz at laacz dot lv
 Reported by:      laacz at laacz dot lv
 Summary:          crypt() function hangs after 3rd call
-Status:           Feedback
+Status:           Open
 Type:             Bug
 Package:          Strings related
 Operating System: Ubuntu 9.04 x64
 PHP Version:      5.3.2

 New Comment:

Since I do not know how to attach files here, there goes links:



php_config.h: http://pastebin.com/xxKxuBS2

config.h: http://pastebin.com/8KcBe0FF



Also, added strace output: http://pastebin.com/sP4hT4LB


Previous Comments:
------------------------------------------------------------------------
[2010-03-29 12:41:22] paj...@php.net

I can't reproduce it here using ubuntu 9.10.



Can you attach the config.log and main/php_config.h (from the build
directory if you compile PHP outside the root src directory).

------------------------------------------------------------------------
[2010-03-29 12:30:34] laacz at laacz dot lv

Description:
------------
When calling crypt() function more than once, it hangs after third call
to it.



Configure parameters:



$ php -i | grep configure

Configure Command =>  './configure'  '--enable-bcmath' '--enable-soap'
'--with-

pgsql' '--with-ldap' '--enable-sqlite-utf8'
'--with-apxs2=/usr/bin/apxs2' '--

prefix=/usr/local' '--with-pdo-mysql'
'--with-config-file-path=/etc/httpd' '--

with-openssl=/usr' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd'
'--with-pdo-

mysql=mysqlnd' '--enable-zip' '--localstatedir=/var' '--enable-ftp'
'--with-

jpeg-dir=/usr' '--with-gd' '--enable-sockets' '--with-zlib-dir=/usr'
'--with-

xmlrpc' '--enable-mbstring=all' '--with-iconv' '--with-gettext'
'--with-

imap=/usr' '--with-imap-ssl=/usr' '--with-curl'
'--with-mcrypt=/usr/local' '--

with-freetype-dir=/usr/include/freetype2' '--enable-gd-native-ttf'
'--with-

mssql' '--with-snmp' '--with-kerberos' '--enable-maintainer-zts'
'--enable-

pcntl'



Compiled in and loaded modules (from get_loaded_extensions()): Core,
date, ereg, 

libxml, openssl, pcre, sqlite3, zlib, bcmath, ctype, curl, dom,
fileinfo, 

filter, ftp, gd, gettext, hash, iconv, session, json, ldap, mbstring,
mcrypt, 

mssql, standard, SPL, pcntl, PDO, mysqlnd, pdo_sqlite, pgsql, Phar,
posix, 

Reflection, pdo_mysql, SimpleXML, snmp, soap, sockets, mysqli, SQLite,
imap, 

tokenizer, xml, xmlreader, xmlrpc, xmlwriter, zip, mysql

Test script:
---------------
<?php

echo "#1: " . crypt('MUrGtL', 'AB') . "\n"; 

echo "#2: " . crypt('MUrGtL', 'AB') . "\n"; 

echo "#3: " . crypt('MUrGtL', 'AB') . "\n"; 

?>

Expected result:
----------------
$ php crypt.php

#1: ABcghTMliojv2

#2: ABcghTMliojv2

#3: ABcghTMliojv2

$ 

Actual result:
--------------
#  php crypt.php

#1: ABcghTMliojv2

#2: ABcghTMliojv2


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51424&edit=1

Reply via email to