Edit report at http://bugs.php.net/bug.php?id=50410&edit=1
ID: 50410 Comment by: mailnew2ster at mail dot ru Reported by: procyonar at gmail dot com Summary: curl extension slows down PHP Status: No Feedback Type: Bug Package: cURL related Operating System: win32 only - Windows 7 PHP Version: 5.2.11 New Comment: The same thing happens on my system. Windows 7 x86, PHP 5.3 (5.3.2) VC9 x86 Thread Safe (2010-Mar-04 20:11:10) After some debugging of php I found out that the RAND_screen() function in libeay32.dll is responsible for slowing down the execution. I've patched the function out, and it really became fast again. I don't use SSL stuff so I don't care how this affects security. The patch is 0xE8 -> 0xC3 on offset 0x0003EE10, you can use it as a temporary solution (patch it with any hex editor). Cheers! Previous Comments: ------------------------------------------------------------------------ [2010-02-18 10:31:00] raul dot valge at gmail dot com I am using PHP as embedded in another Win application. I can confirm that the issue occurs both from cli and embed sapi. I have tried different versions and also found that the issue started with 5.2.11 and is present up to 5.3.1 ------------------------------------------------------------------------ [2010-01-15 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2010-01-13 02:00:23] wzed dot php at gmail dot com I'm not the original reporter, but I cannot confirm that the bug affects requests when running PHP as an Apache 2.2 module, only that Apache start/restart is noticeably slower with curl enabled. Is there more initialization code now than there was in 5.2.10? I ran a diff of /ext/curl/* between 5.2.10 and 5.2.12 and didn't see anything significant. I just tested PHP 5.3.1 and sadly the bug exists there too. :( (I'm calling it a bug because the cause of the delay is still unknown) ------------------------------------------------------------------------ [2010-01-06 03:23:25] paj...@php.net I don't think it happens during all requests but when you start apache (as running CLI). Can you confirm that the slowdown happens on all requests and not only on apache start? PHP's curl does some initialization, just like many other exts. ------------------------------------------------------------------------ [2010-01-06 03:00:51] wzed dot php at gmail dot com I'm also having this problem, with a freshly-extracted copy of php-5.2.12-Win32.zip (php.ini edited to enable curl). In my case the CPU spike lasts about 2 seconds (just running php.exe -v), but that's a significant delay for someone who runs CLI scripts often. It seems to only affect PHP 5.2.11 and 5.2.12, as I wasn't able to reproduce it with 5.2.10 using the exact same php.ini file. Confirmed on Windows 7 and XP. ------------------------------------------------------------------------ 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=50410 -- Edit this bug report at http://bugs.php.net/bug.php?id=50410&edit=1