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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 11:01:33 2024 UTC