ID: 43437 Comment by: john dot navratil at sbcglobal dot net Reported By: denis dot arh at gmail dot com Status: Open Bug Type: SOAP related Operating System: CentOS 5 PHP Version: 5.2.5 New Comment:
OS: Solaris 8 PHP: 5.2.4 and 5.2.6 SOAP Server Example -------: <? function myMethod($user, $pwd) { $rslt = str_repeat('x', 7444); return $rslt; } ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache $server = new SoapServer("http://myURL/my.wsdl"); $server->addFunction("myMethod"); ?> SOAP Client test code -------: <?php ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache -- remove after testing $client = new SoapClient("http://myURL/my.wsdl"); try { print($client->myMethod("asdf", "asdf")); print($client->myMethod("asdf", "asdf")); } catch (SoapFault $exception) { echo $exception; } ?> Attempting to return a string 7443 X's succeeds. 7444 fails with message: PHP Warning: SoapClient::__doRequest(): 1 bytes of buffered data lost during stream conversion!. After failure, a second SOAP invocation results in a segmentation fault. FWIW: Hitting the same SOAP server with a VBScript test script doesn't exhibit the error. Previous Comments: ------------------------------------------------------------------------ [2007-11-29 12:12:16] denis dot arh at gmail dot com Tried with the latest PHP (from the link you gave me) - still no luck #0 0x0021f333 in strlen () from /lib/libc.so.6 #1 0x0817a9b6 in get_http_header_value (headers=0x0, type=0x83b8fec "HTTP/") at /usr/src/php/php5.2-200711290930/ext/soap/php_http.c:1144 #2 0x0817caef in make_http_soap_request (this_ptr=0x9fd5290, buf=0xa00c740 "<?xml version=\"1.0\" ..... ------------------------------------------------------------------------ [2007-11-28 12:45:22] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi I think it was fixed already, so please try the snapshot to verify. ------------------------------------------------------------------------ [2007-11-28 10:10:44] denis dot arh at gmail dot com Description: ------------ Same problems (segfault) with second call on same client object (re-opening SoapClient solves this issue) Similar problems as described here: #35570 Reproduce code: --------------- $c = new SoapClient('api_v0.2.wsdl', array( 'encoding' => 'UTF-8', 'trace' => true, 'exceptions' => true, )); // call 1 --> OK // call 2 --> segfault Expected result: ---------------- Both calls ok, no segfault Actual result: -------------- PHP Warning: Warning: SoapClient::__doRequest(): 31 bytes of buffered data lost during stream conversion! Segmentation fault --------- #0 0x00b43333 in strlen () from /lib/libc.so.6 #1 0x012589c2 in get_http_header_value (headers=0x0, type=0x127c3fb "HTTP/") at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/php_http.c:1144 #2 0x0125ad3a in make_http_soap_request (this_ptr=0x84d9bd0, buf=0x850a6a0 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"http://schemas.zejn.si/AvtoPortal/\"><SOAP-ENV:Body><ns1:login><userName>"..., buf_size=302, location=0x84e49a4 "http://dev.avtooglasnik.lan/api/api_v0.2.php", soapaction=0x84e4b00 "http://dev.avtooglasnik.lan/api/php?application=embedded&service=AdCaptureService&method=login", soap_version=1, buffer=0x84d9e70, buffer_len=0x84d9e74) at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/php_http.c:734 #3 0x0123b973 in zim_SoapClient___doRequest (ht=5, return_value=0x84d9e70, return_value_ptr=0x0, this_ptr=0x84d9bd0, return_value_used=1) at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/soap.c:3035 #4 0x0820b4ee in zend_call_function () #5 0x0820c4dc in call_user_function_ex () #6 0x0820c55b in call_user_function () #7 0x01240f19 in do_request (this_ptr=0x84d9bd0, request=<value optimized out>, location=0x84e49a4 "http://dev.avtooglasnik.lan/api/api_v0.2.php", action=0x84e4b00 "http://dev.avtooglasnik.lan/api/php?application=embedded&service=AdCaptureService&method=login", version=1, one_way=0, response=0xbfc75a30) at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/soap.c:2549 #8 0x01246ba3 in do_soap_call (this_ptr=0x84d9bd0, function=0x84d6b50 "login", function_len=<value optimized out>, arg_count=1, real_args=0x84d9db0, return_value=0x84dc610, location=0x84e49a4 "http://dev.avtooglasnik.lan/api/api_v0.2.php", soap_action=0x0, call_uri=0x0, soap_headers=0x0, output_headers=0x0) at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/soap.c:2673 #9 0x012479ec in zim_SoapClient___call (ht=2, return_value=0x84dc610, return_value_ptr=0x0, this_ptr=0x84d9bd0, return_value_used=1) at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/soap.c:2889 #10 0x0820b4ee in zend_call_function () #11 0x0822ca6f in zend_call_method () #12 0x08233c05 in zend_std_call_user_call () #13 0x08238e20 in zend_do_fcall_common_helper_SPEC () #14 0x08237c7d in execute () #15 0x08216f1a in zend_execute_scripts () #16 0x081d0093 in php_execute_script () #17 0x0829cc76 in main () ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43437&edit=1