ID:               45238
 Updated by:       j...@php.net
 Reported By:      john dot navratil at sbcglobal dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         SOAP related
 Operating System: Solaris 8
 PHP Version:      5.2.6
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------

[2008-06-11 14:10:13] john dot navratil at sbcglobal dot net

Description:
------------
This is related to bug 43437.  In fact, I posted this as a comment to
that bug, but there doesn't appear to be much action there.  Sorry if I
am posting a duplicate.

A segmentation fault is generated when a client invokes a SOAP method
via _doRequest() after what appears to be a buffer overflow in a
previous request.  The test code return a string of bytes.  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.

Reproduce code:
---------------
SOAP Server Example -------:
<?
function myMethod()
{
  $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");
$client = new SoapClient("http://myURL/my.wsdl";);
try
{
        print($client->myMethod());
        print($client->myMethod());
}
catch (SoapFault $exception)
{
        echo $exception;
}
?>


Expected result:
----------------
A stream of 'X's

Actual result:
--------------
A segmentation fault


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45238&edit=1

Reply via email to