Edit report at http://bugs.php.net/bug.php?id=51424&edit=1
ID: 51424 Updated by: srina...@php.net Reported by: laacz at laacz dot lv Summary: crypt() function hangs after 3rd call Status: Assigned Type: Bug Package: Strings related Operating System: Ubuntu 9.04 x64 PHP Version: 5.3.2 Assigned To: pajoye New Comment: hi laacz at laacz dot lv can u please try with this patch and see if this addresses u r issue to apply this patch, u will need to save the below contents into a file and run cd php-5.3.2 patch -d . < <saved-file-name> gmake clean gmake --- ext/standard/php_crypt_r.c.orig Wed Jun 16 05:59:16 2010 +++ ext/standard/php_crypt_r.c Wed Jun 16 06:00:17 2010 @@ -81,9 +81,7 @@ tsrm_mutex_lock(php_crypt_extended_init_lock); #endif - if (initialized) { - return; - } else { + if (!initialized) { _crypt_extended_init(); initialized = 1; } Previous Comments: ------------------------------------------------------------------------ [2010-06-15 15:43:34] paj...@php.net Automatic comment from SVN on behalf of pajoye Revision: http://svn.php.net/viewvc/?view=revision&revision=300466 Log: - #51424, silent warnings on win ------------------------------------------------------------------------ [2010-06-15 11:26:24] paj...@php.net Automatic comment from SVN on behalf of pajoye Revision: http://svn.php.net/viewvc/?view=revision&revision=300460 Log: - Fix #51424, crypt() function hangs after 3rd call ------------------------------------------------------------------------ [2010-06-15 11:26:10] paj...@php.net Automatic comment from SVN on behalf of pajoye Revision: http://svn.php.net/viewvc/?view=revision&revision=300459 Log: - Fix #51424, crypt() function hangs after 3rd call ------------------------------------------------------------------------ [2010-06-05 01:18:27] tallyce at gmail dot com Also confirmed third call hang on Win7/Apache2.2/PHP5.3.2. Can anyone suggest a workaround until the next release? ------------------------------------------------------------------------ [2010-05-27 02:34:10] thbley at gmail dot com Same problem on windows (5.3.2 binary, php5apache2_2.dll): Run 2 requests in parallel: for ($i=0; $i<500000; $i++) { crypt('a', '_'); } ab -n 1 -c 1 http://localhost/test.php => ~1 second, ok ab -n 2 -c 2 http://localhost/test.php => hangs ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=51424 -- Edit this bug report at http://bugs.php.net/bug.php?id=51424&edit=1