I really don't understand what's happening with PHP SOAP library I use a SOAP service, it's working well but sometimes i have the well-know "Fatal error: SOAP-ERROR: Parsing WSDL: ........"
I have read that this error was uncatchable because Xdebug was on and that the solution is to disable it to be able to catch the error,...
but i doesn't work ! the error is displayed with the orange and red colors do you have an idea ??
(I use the last version of wamp, i don't know how to check if i choosed 64 or 32bits but it's apache 2.2.22, php 5.3.13)
thanks in advance for your help ! :)
<?php
xdebug_disable();
try {
$sc = new SoapClient("some-wrong.wsdl", array('exceptions' => true));
} catch (Exception $e) {
echo 'Error Caught :-)';
}
?>
I want to add that :
sometimes I have 2 warning and 1 error
- Warning: SoapClient::SoapClient -> "failed to open stream ..."
- Warning: SoapClient::SoapClient -> "failed to load external entity ..."
- Fatal error: SOAP-ERROR: Parsing WSDL -> "Couldn't load from ..."
and sometimes, just the fatal error
I have placed an echo just after the line new SoapClient(..... and when there's an uncatched error, the echo is not displayed
I have to add that I call SoapClient with 'trace' => 1, 'exceptions' => 1,
and i have this in apache error log (** used to hide)
[Thu Jan 31 16:16:02 2013] [error] [client 127.0.0.1] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://******?wsdl' : Start tag expected, '<' not found
in D:\\Programmes\\wamp\\www\\******.php on line 144, referer: http://localhost/******.php
[Thu Jan 31 16:16:04 2013] [error] [client 127.0.0.1] PHP Warning: ||| faultcode: WSDL ||| faultstring: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://******?wsdl' : Start tag expected, '<' not found
||| in D:\\******.php on line 201, referer: http://localhost/******.php
[Thu Jan 31 16:16:04 2013] [error] [client 127.0.0.1] PHP Fatal error: Call to a member function __getLastRequestHeaders() on a non-object in D:\\Programmes\\wamp\\www\\******.php on line 204, referer: http://localhost/******.php
I edit my first message because i am new memebr and can t answer to my own message before 8 hours
so this morning, I have change the default stack size of apache because apache was craching with just this line in the apache error log : [notice] Parent: child process exited with status 255 -- Restarting.
-> It s strange because after to have done this, I had WSDL uncaught errors but since few hours I have not this kind of error, may be it s just the proxy list that I use that are able to connect correctly,.. ??
The SOAP extension does some strange things and overrides an internal PHP errorhandler. This conflicts a little with Xdebug's error overriding mechanisms. Do include the full error message though, and I can perhaps update my answer from there on.
Here s the detailed error message Xdebug I get (** to hide)
( ! ) Warning: SoapClient::SoapClient(http://****?wsdl) [<a href='soapclient.soapclient'>soapclient.soapclient</a>]: failed to open stream: Une tentative de connexion a �chou� car le parti connect� n�a pas r�pondu convenablement au-del� d�une certaine dur�e ou une connexion �tablie a �chou� car l�h�te de connexion n�a pas r�pondu. in D:\Programmes\wamp\www\****.php on line 146
Call Stack
# Time Memory Function Location
1 0.0013 497672 {main}( ) ..\script gepir3-1.php:0
2 0.6920 695896 SoapClient->SoapClient( ) ..\script gepir3-1.php:146
( ! ) Warning: SoapClient::SoapClient() [<a href='soapclient.soapclient'>soapclient.soapclient</a>]: I/O warning : failed to load external entity "http://****?wsdl" in D:\Programmes\wamp\www\****.php on line 146
Call Stack
# Time Memory Function Location
1 0.0013 497672 {main}( ) ..\script gepir3-1.php:0
2 0.6920 695896 SoapClient->SoapClient( ) ..\script gepir3-1.php:146
( ! ) Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://*****.asmx?wsdl' : failed to load external entity "http://****asmx?wsdl" in D:\Programmes\wamp\www\****.php on line 146
Call Stack
# Time Memory Function Location
1 0.0013 497672 {main}( ) ..\script gepir3-1.php:0
2 0.6920 695896 SoapClient->SoapClient( ) ..\script gepir3-1.php:146
And i don't understand why my php.ini contains this parameter turned to off (the autostart is missing too
; XDEBUG Extension
zend_extension = "D:/Programmes/wamp/bin/php/php5.3.13/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"
[xdebug]
xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "D:/Programmes/wamp/tmp"