Bug #62890 [NEW]: Set default_socket_timeout to -1 causes not able to connect
From: fallingdust at gmail dot com
Operating system: Mac Lion 10.7.4
PHP version: 5.3.16
Package: Sockets related
Bug Type: Bug
Bug description:Set default_socket_timeout to -1 causes not able to connect
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 bug report at https://bugs.php.net/bug.php?id=62890&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62890&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62890&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62890&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62890&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62890&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62890&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62890&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62890&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62890&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62890&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62890&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62890&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62890&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62890&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62890&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62890&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62890&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62890&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62890&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62890&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62890&r=mysqlcfg
Thread (6 messages)
- fallingdust at gmail dot com