php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53023 Fatal error gets displayed but is not fatal
Submitted: 2010-10-08 10:50 UTC Modified: 2011-02-07 15:50 UTC
Votes:5
Avg. Score:4.6 ± 0.5
Reproduced:5 of 5 (100.0%)
Same Version:5 (100.0%)
Same OS:5 (100.0%)
From: daniel dot seif at castex dot de Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.3.5 OS: *
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: daniel dot seif at castex dot de
New email:
PHP Version: OS:

 

 [2010-10-08 10:50 UTC] daniel dot seif at castex dot de
Description:
------------
When creating a soap client on a non-existing wsdl, an exception gets thrown and at the same time, a fatal error gets logged, but the script continues.


Test script:
---------------
try {
	$client = new SoapClient('nonexistentfile.wsdl');
} catch (Exception $e) {
	echo "catched exception: ", get_class($e), ": ", $e->getMessage();
}

echo "if we had a real Fatal error, we wouldn't execute this line\n";

Expected result:
----------------
catched exception: SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'nonexistentfile.wsdl' : failed to load external entity "nonexistentfile.wsdl"
if we had a real Fatal error, we wouldn't execute this line


Actual result:
--------------
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'nonexistentfile.wsdl' : failed to load external entity "nonexistentfile.wsdl"
 in /cab/src/dev/htdocs/test/scratchbook.php on line 102
catched exception: SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'nonexistentfile.wsdl' : failed to load external entity "nonexistentfile.wsdl"
if we had a real Fatal error, we wouldn't execute this line


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-09 01:21 UTC] felipe@php.net
I can't reproduce this.
 [2010-10-16 23:42 UTC] daniel dot seif at castex dot de
I just tested again:

New Test script:

<?php

error_reporting(E_ALL | E_STRICT);
ini_set('display_error', 'on');
header('Content-Type: text/plain');

try {
        $client = new SoapClient('nonexistentfile.wsdl');
} catch (Exception $e) {
        echo "caught exception: ", get_class($e), ": ", $e->getMessage();
}

echo "if we had a real Fatal error, we wouldn't execute this line\n";

print_r(error_get_last());

?>

The result is the same as written in the bug report. There's also an entry with a fatal error in the web server's error log:

[Sat Oct 16 23:39:54 2010] [error] [client ::1] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'nonexistentfile.wsdl' : failed to load external entity "nonexistentfile.wsdl"\n in /var/www/test2.php on line 8
 [2011-02-07 15:00 UTC] iliaa@php.net
-Status: Open +Status: Bogus
 [2011-02-07 15:00 UTC] iliaa@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Cannot reproduce this either using the provided script on PHP 5.3.4
 [2011-02-07 15:33 UTC] daniel dot seif at castex dot de
-PHP Version: 5.3.3 +PHP Version: 5.3.5
 [2011-02-07 15:33 UTC] daniel dot seif at castex dot de
I don't know how this is tested before it is marked as bogus, but I can still reproduce this error: I just downloaded php-5.3.5-nts-Win32-VC9-x86 and ran the script again with the same result.

What can I deliver so you can dig deeper into this?

Result:

PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'nonexistentfile.wsdl' : failed to load external entity "nonexistentfile.wsdl"
 in C:\Dokumente und Einstellungen\dseif\Eigene Dateien\Downloads\php-5.3.5-nts-Win32-VC9-x86\test.php on line 11
caught exception: SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'nonexistentfile.wsdl' : failed to load external entity "nonexistentfile.wsdl"
if we had a real Fatal error, we wouldn't execute this line
 [2011-02-07 15:50 UTC] daniel dot seif at castex dot de
If this helps: In version 5.2.4 the script generates a warning instead of an error.
 [2011-12-14 20:45 UTC] daniel at dnaielcraig dot me
Still getting this behavior with 5.3.8
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 16:03:14 2021 UTC