|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31614 file_get_contents/fopen don't respect default_socket_timeout
Submitted: 2005-01-19 17:45 UTC Modified: 2005-08-21 01:00 UTC
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: wkonkel at gmail dot com Assigned:
Status: No Feedback Package: Network related
PHP Version: 4.3.10 OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
10 - 6 = ?
Subscribe to this entry?

 [2005-01-19 17:45 UTC] wkonkel at gmail dot com
The functions file_get_contents and fopen, when opening an http or https location, don't use the default_socket_timeout specified in the php.ini.

Reproduce code:
ini_set("default_socket_timeout", 2);
echo file_get_contents("");

Expected result:
(2 seconds later... nothing)

Actual result:
(60 seconds later... nothing)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-13 21:10 UTC]
Please try using this CVS snapshot:
For Windows:

It is working here.
 [2005-08-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-05-02 17:11 UTC] cv dot mail at mail dot ru
Still doesn't work in 4.4.9
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 21 08:01:23 2020 UTC