php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45785 Configurable timeout on XMLReader->open()
Submitted: 2008-08-11 11:38 UTC Modified: 2009-07-10 13:49 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:4 (80.0%)
Same OS:4 (80.0%)
From: bugzilla-php at roosnl dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.6 OS: Linux
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 !
Your email address:
MUST BE VALID
Solve the problem:
2 + 20 = ?
Subscribe to this entry?

 
 [2008-08-11 11:38 UTC] bugzilla-php at roosnl dot com
Description:
------------
The Open function of the XMLReader object does not seem to have a configurable timeout. This means that my PHP app seems to 'hang' for 30 seconds while connecting to an external xml source that has an outage. It would be good if it had a configurable timeout so I can set that to a low number, like for example the curl functions or 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-10 10:52 UTC] nick at ihighteam dot com
For me, this has caused a partial site outage on a big project where multiple Apache processes are hung up on PHP waiting to open a remote XML feed that happens to be inaccessible.
 [2009-07-10 11:31 UTC] pajoye@php.net
All XML extensions use the PHP streams. You can define a shorter timeout using php.ini. Not a bug > bogus.
 [2009-07-10 13:49 UTC] rasmus@php.net
Or by setting it in the default stream context just before the open.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 22:01:30 2024 UTC