#36615 [NEW]: SSL fsockopen and stream_socket_client takes too long
| From: | georgechianrs at gmail dot com | Date: | Sun, 05 Mar 2006 04:10:43 +0000 |
| Subject: | #36615 [NEW]: SSL fsockopen and stream_socket_client takes too long | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-93923@lists.php.net to get a copy of this message | ||
From: georgechianrs at gmail dot com
Operating system: Windows
PHP version: 5.1.2
PHP Bug Type: Streams related
Bug description: SSL fsockopen and stream_socket_client takes too long
Description:
------------
When using SSL fsockopen and stream_socket_client takes 1.7 seconds to
return on WIndows. This seems to be a huge improvement from php-5.0 where
it used to take 6.3 to 8.7 seconds for fsockopen to return. The problem
occurs only when using ssl, and for tcp connections the speeds are
comparable to that on linux.
Also the the delay occurs only in the first call in a script, and later
calls takes the same time 0.02 seconds, which is again same as that on
linux.
These are the times for fsockopen on windows and linux:
TCP:
linux: 0.003 seconds
windows: 0.003 seconds
SSL:
linux: 0.02
Windows: php-5.0: 8.2 seconds
Windows: php-5.1: 1.2 seconds
Thanks.
George.
Reproduce code:
---------------
<?php
fsockopen("ssl://localhost", "443");
Expected result:
----------------
Should return in 0.02 seconds for ssl.
Actual result:
--------------
Takes too long. For php5.0 the time used to increase when the script
becomes larger. This seems to have got solved with php-5.1.
IN php-5.1 fsockpen("ssl://localhost") takes 1.2 seconds. Which is around
50 times slower than expected.
--
Edit bug report at http://bugs.php.net/?id=36615&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36615&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36615&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36615&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36615&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36615&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36615&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36615&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36615&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36615&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36615&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36615&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36615&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36615&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36615&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36615&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36615&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36615&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36615&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36615&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36615&r=mysqlcfg