Bug #62890 [Com]: Set default_socket_timeout to -1 causes not able to connect
Edit report at https://bugs.php.net/bug.php?id=62890&edit=1
ID: 62890
Comment by: pembo at neonerve dot com
Reported by: fallingdust at gmail dot com
Summary: Set default_socket_timeout to -1 causes not able to
connect
Status: Open
Type: Bug
Package: Sockets related
Operating System: Mac Lion 10.7.4
PHP Version: 5.3.16
Block user comment: N
Private report: N
New Comment:
This appears to only be an issue on Macs. When using it on Windows / Linux it performs as expected.
Previous Comments:
------------------------------------------------------------------------
[2012-08-22 10:25:06] fallingdust at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/filesystem.configuration
---
php.ini configuration:
allow_url_fopen = On
allow_url_include = Off
;from="john@doe.com"
;user_agent="PHP"
default_socket_timeout = 60
;auto_detect_line_endings = Off
Test script:
---------------
php -r 'ini_set("default_socket_timeout", -1); echo file_get_contents("http://www.google.com");'
Expected result:
----------------
print the html of google page.
Actual result:
--------------
PHP Warning: file_get_contents(http://www.google.com): failed to open stream:
Operation now in progress in Command line code on line 1
PHP Stack trace:
PHP 1. {main}() Command line code:0
PHP 2. file_get_contents() Command line code:1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62890&edit=1
Thread (6 messages)