|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62811 WSDL load failure indicates (but does not actually cause) fatal error
Submitted: 2012-08-13 16:52 UTC Modified: 2018-03-23 11:40 UTC
Avg. Score:4.7 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:4 (57.1%)
From: eric at wepay dot com Assigned: nikic (profile)
Status: Closed Package: SOAP related
PHP Version: 5.3.15 OS: OS X, CentOS
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.
Block user comment
Status: Assign to:
Bug Type:
From: eric at wepay dot com
New email:
PHP Version: OS:


 [2012-08-13 16:52 UTC] eric at wepay dot com
If a WSDL file is unavailable when running SoapClient::__construct(), PHP 
indicates a fatal error to STDERR yet continues to process the script.  This 
causes erroneous errors to end up in logs and creates a lot of misdirection around 
whether or not we have legitimate problems.

It should continue to generate the SoapFault which contains approximately the same 
message, but should not indicate the fatal error.

Test script:
set_error_handler(function($a,$b,$c,$d) { throw new ErrorException($b,0,$a,$c,$d); }, -1);

try {
	new SoapClient('');
catch (SoapFault $e) {
	echo "SoapFault\n";
catch (ErrorException $e) {
	echo "ErrorException\n";
catch (Exception $e) {
	echo "Exception\n";
echo "I survived\n";
register_shutdown_function(function() {
	echo 'Shutdown';

Expected result:

I survived

Actual result:
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 
'' : failed to load external entity 
 in /private/var/folders/w2/rlynjnwx7zdfzgr2m_h6bt8m0000gn/T/untitled_4d..php on 
line 4

I survived


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-13 16:53 UTC] eric at wepay dot com
updating title to better reflect the problem
 [2012-08-13 16:53 UTC] eric at wepay dot com
-Summary: WSDL load failure generates fatal, non-catchable error +Summary: WSDL load failure indicates (but does not actually cause) fatal error
 [2013-08-20 14:10 UTC] azhdanov at terricone dot com
This bug is still valid in PHP 5.4.9.

Enabling/disabling xdebug doesn't work.
 [2018-03-23 11:40 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2018-03-23 11:40 UTC]
This has been fixed by bug #70469 in 7.1.14/7.2.2.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 07:01:29 2024 UTC