php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49587 Parsing WSDL: Couldn't load from URL throws exception AND fatal error
Submitted: 2009-09-18 11:31 UTC Modified: 2009-09-18 13:40 UTC
From: proofek at gmail dot com Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.3.0 OS: Linux
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: proofek at gmail dot com
New email:
PHP Version: OS:

 

 [2009-09-18 11:31 UTC] proofek at gmail dot com
Description:
------------
It is related to #34657 but happens in a bit different situation.
No xdebug loaded. Exception is throws and is catchable, but FATAL error 
still appears in error log.

Now to my surprise FATAL error is not visible on standard output when 
you switch display_errors on.

That also explains why it's not revealed in 
http://svn.php.net/viewvc/php/php-
src/branches/PHP_5_2/ext/soap/tests/bugs/bug34657.phpt?view=markup, 
although this test is broken anyway.

Both php 5.3 and 5.2 affected

Reproduce code:
---------------
Pseudo code:

try
{
$client = new SoapClient('http://not.there.com/a.php?wsdl');
} catch (Exception $e) {
echo "Exception thrown: " . $e->getMessage();
}

Expected result:
----------------
Message on std output:

Exception thrown: SOAP-ERROR: Parsing WSDL: Couldn't load from 
http://not.there.com/a.php?wsdl

Actual result:
--------------
Message on std output:

Exception thrown: SOAP-ERROR: Parsing WSDL: Couldn't load from 
http://not.there.com/a.php?wsdl

FATAL thrown in error log:

PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 
http://not.there.com/a.php?wsdl

Script halted.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-18 13:40 UTC] proofek at gmail dot com
Bogus.

The problem is actually because of SoapClient raises a E_WARNING 

"SoapClient::SoapClient() [<a href='function.SoapClient-
SoapClient'>function.SoapClient-SoapClient</a>]: 
php_network_getaddresses: getaddrinfo failed: Name or service not 
known"

which then was caught by my custom error handler and turn into 
Exception.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 24 03:03:35 2021 UTC