|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-11-06 20:40 UTC] noah at rave dot ca
[2008-11-08 23:38 UTC] dsp@php.net
[2008-11-11 17:32 UTC] noah at rave dot ca
[2008-11-16 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
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...