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

 ID:                 53578
 Updated by:         paj...@php.net
 Reported by:        tanguy dot pruvot at gmail dot com
 Summary:            php_curl init time (3 big seconds)
 Status:             Open
 Type:               Bug
 Package:            cURL related
 Operating System:   Win7/Vista x86
 PHP Version:        5.3.4 (Since 5.2.14/5.3)
 Block user comment: N
 Private report:     N

 New Comment:

btw, I just applied this change to my tree as well:



https://github.com/pierrejoye/curl



nmake /f Makefile.vc9 WINDOWS_SSPI=1 USE_IPV6=1
WITH_DEVEL=g:\php-sdk\lib_builds\vc9\x86\deps
CFG=release-ssh2-ssl-dll-zlib



to build it for PHP's VC9 (with almost all protocols, incl. ssh2). As
long as you copied the dependencies in ..\deps (like for php's builds).


Previous Comments:
------------------------------------------------------------------------
[2010-12-20 10:42:34] paj...@php.net

As I said, the libcurl previous release (for our build only) has been
modified to do not call this function anymore. The latest libcurl
release should have the fix too.

------------------------------------------------------------------------
[2010-12-20 10:12:20] tanguy dot pruvot at gmail dot com

Just to confirm :



I tried all 5.3.4 and 5.2.16 versions (TS/NTS VC6/VC9), even a self
compiled one 

from sources and the problem always appears on Vista and Seven x86



I posted a bug report to curl team... but i cant find RAND_screen() call
in their 

lastest release...

------------------------------------------------------------------------
[2010-12-20 07:43:47] tanguy dot pruvot at gmail dot com

Ok, hmm after a night of debug, i think the code is in the static
libcurl_a.lib



i've tried to build a module with standard libcurl dlls (php_curl of
64k).... but 

seems to have a bad address for the curl_global_init() call



I think we need to follow this issue to curl team :p

------------------------------------------------------------------------
[2010-12-20 04:03:25] tanguy dot pruvot at gmail dot com

If you want to try the difference, here is the patched php_curl dll.



http://tanguy.wdscript.fr/files/php_curl.534vc6ts.Patched.zip



I'm now compiling php with openssl comment... to check if its the cause
of the 

problem... i dont understand why this code is in php_curl dll code...

------------------------------------------------------------------------
[2010-12-20 02:34:29] tanguy dot pruvot at gmail dot com

Here is an asm dump of lib_curl.dll 5.3.4 VC6 TS where RAND_screen is
used :



0035DB10   > \E8 FF360100   call    <jmp.&SSLEAY32.#74>

0035DB15   .  E8 F4360100   call    <jmp.&SSLEAY32.#183>

0035DB1A   .  85C0          test    eax, eax                            
                         

;  kernel32.BaseThreadInitThunk

0035DB1C   .  75 01         jnz     short php_curl.0035DB1F

0035DB1E   .  C3            ret

0035DB1F   >  E8 E4360100   call    

<jmp.&LIBEAY32.#3212_OPENSSL_add_all_algorithms_noconf>

0035DB24   .  E8 D9360100   call    <jmp.&LIBEAY32.#468_RAND_screen>

0035DB29   .  B8 01000000   mov     eax, 1

0035DB2E   .  C3            ret





A simple replace of E8 D9360100 by 90 90909090 will fix the problem...
but maybe 

a call to the regular rand() function could be needed elsewhere...

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


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=53578


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

Reply via email to