ID: 46512
Updated by: [EMAIL PROTECTED]
Reported By: noah at rave dot ca
-Status: Open
+Status: Assigned
Bug Type: OpenSSL related
Operating System: Windows Server 2003
PHP Version: 5.2.7RC2
-Assigned To:
+Assigned To: dsp
Previous Comments:
------------------------------------------------------------------------
[2008-11-06 20:40:00] noah at rave dot ca
I'm actually using RC3, which is not in the list...
------------------------------------------------------------------------
[2008-11-06 20:35:24] noah at rave dot ca
Description:
------------
When you use fsockopen and connect to SSL if the timeout is less then
1.0 it will cause an error... If it's 1.0 or over it will work as
expected...
Reproduce code:
---------------
if ($fp = fsockopen('ssl://www.website.com', 443, $errno, $errstr,
0.1))
{
$out = "GET /schedule/schedule_end/ HTTP/1.1\r\n";
$out .= "Host: www.website.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fputs($fp, $out);
fclose($fp);
}
SHOWS ERROR:
Warning: fsockopen() [function.fsockopen]: SSL: connection timeout in
C:\Websites\website.com\website\include\show\admin\a.php on line 2
Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in
C:\Websites\website.com\website\include\show\admin\a.php on line 2
Warning: fsockopen() [function.fsockopen]: unable to connect to
ssl://www.website.com:443 (Unknown error) in
C:\Websites\website.com\website\include\show\admin\a.php on line 2
if ($fp = fsockopen('ssl://www.website.com', 443, $errno, $errstr,
1))
{
$out = "GET /schedule/schedule_end/ HTTP/1.1\r\n";
$out .= "Host: www.website.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fputs($fp, $out);
fclose($fp);
}
WORKS AS EXPECTED!!!
Expected result:
----------------
It should run with a 0.05, 0.1 or 0.99 timeout as it did in previous
versions...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46512&edit=1