php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45263 Socket Timeout on SOAP request causes program termination
Submitted: 2008-06-13 14:53 UTC Modified: 2008-07-11 01:00 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:2 (66.7%)
From: mimiller at ncsa dot uiuc dot edu Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.5 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mimiller at ncsa dot uiuc dot edu
New email:
PHP Version: OS:

 

 [2008-06-13 14:53 UTC] mimiller at ncsa dot uiuc dot edu
Description:
------------
I am seeing behavior in PHP5.2.5 on windows similar to what's described in Bug #35582  	Socket Timeout on SOAP request causes program termination.  Maybe need to repopen that bug?

Here's my code:
$uri='https://testvenue3.somewhere.com/VenueServer'
$v = new SoapClient($uri.'?WSDL');

The $uri is coming from a database where the offending $uri is just some test data.  But there are other valid URIs called subsequently.  I could just array_shift the first to avoid the problem, but that's cludgy.  So I tried to wrap it with another error handler:

set_error_handler('handle_error',E_ALL | E_NOTICE );
$uri='https://somewhere.com/test'
$v = new SoapClient($uri.'?WSDL');
restore_error_handler();

and I get the following from my handler function:
2 SoapClient::SoapClient() [function.SoapClient-SoapClient]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\Users\mimiller.NCSA\Documents\UIUC\NCSA\www\AGSchedule\AG.php on line 40
https://testvenue3.somewhere.com/VenueServer

2 SoapClient::SoapClient(https://testvenue3.somewhere.com/VenueServer?WSDL) [function.SoapClient-SoapClient]: failed to open stream: No such file or directory in C:\Users\mimiller.NCSA\Documents\UIUC\NCSA\www\AGSchedule\AG.php on line 40
https://testvenue3.somewhere.com/VenueServer

2 SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity "https://testvenue3.somewhere.com/VenueServer?WSDL" in C:\Users\mimiller.NCSA\Documents\UIUC\NCSA\www\AGSchedule\AG.php on line 40
https://testvenue3.somewhere.com/VenueServer

Which would be fine, but the script dies and outputs the following before I restore_error_handler():

Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://testvenue3.somewhere.com/VenueServer?WSDL' in C:\Users...snip

Which doesn't appear to be my handler function.

Regardless, if I'm handling the errors, the script should continue.

Reproduce code:
---------------
set_error_handler('handle_error',E_ALL | E_NOTICE );
$uri='https://somewhere.com/test'
$v = new SoapClient($uri.'?WSDL');
restore_error_handler();

Expected result:
----------------
The script should continue.

Actual result:
--------------
The script dies.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-13 14:55 UTC] mimiller at ncsa dot uiuc dot edu
$uri='https://somewhere.com/test'

should read

$uri='https://testvenue3.somewhere.com/VenueServer'
 [2008-07-11 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".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 12:01:28 2025 UTC