3

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\n 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\n ||| 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.

  • I have installed visual basic 2012 (evaluation ;) )
  • used the visual basic command console (start > Micrososft Visual Studio 2012 > Visual studio tools)
  • checked the sire typing "cd ***my_path_containing_apache_bin_directory**\bin dumpbin /all httpd.exe | find "stack"" (is was " 40000 size of stack reserve " )
  • increase the size typing editbin /stack:1048576 httpd.exe
  • And don't forgot to PUT ADMINISTRATOR RIGHT on the httpd.exe file + exit WANP !!! (I lost a morning because of this !, editbin was returning a LINK error !!)

-> 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,.. ??

Philippos
  • 103
  • 1
  • 8
  • the error may be "well known", but it's still a good idea to quote the entire error message in the question. There may be something specific in the error message that we need to know in order to help you. – SDC Jan 31 '13 at 14:03
  • Ok i just add the error again, so the memory stack is not linked,... – Philippos Jan 31 '13 at 18:00

3 Answers3

0

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.

Derick
  • 35,169
  • 5
  • 76
  • 99
  • So i just update my message with error element, is it enought or do you need other things ? if yes, could you tell me where I can find the elements you need ? thanks again :) (you are the Derick posting on mentis for PHP bugs ?) – Philippos Jan 31 '13 at 15:22
  • Hello, I just placed detailed erro message ! – Philippos Feb 01 '13 at 09:49
  • Derick, I have a very quick question : if I turn off Xdebug, the error will be cautched ? – Philippos Feb 01 '13 at 11:00
0

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 &quot;http://****?wsdl&quot; 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"
Philippos
  • 103
  • 1
  • 8
0

Maybe it's a bit late but Opcache module also interferes with XDebug : https://xdebug.org/docs/compat

It must be disabled in order to work with NetbeansIDE