ID:               50722
 Updated by:       srina...@php.net
 Reported By:      meatloafninja at gmail dot com
 Status:           Open
 Bug Type:         SOAP related
 Operating System: CentOS 5.x
 PHP Version:      5.2.12
 New Comment:

sounds similar to bug #50675 (See Also)


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

[2010-01-11 17:51:12] meatloafninja at gmail dot com

Description:
------------
If you enable WSDL caching and set the cache type to 2 (memory) or 3
(both disk and memory), and create a SoapServer with a WSDL, and within
the context of that SoapServer create multiple SoapClient connections to
external web services with WSDLs (exceeding the soap.wsdl_cache_limit
setting), the SoapServer's in-memory copy of its own WSDL will get
removed / freed.

This causes a segmentation fault of the web server child process or a
corrupt / invalid XML response, as the SoapServer will be unable to
access its own WSDL when the time comes to send its response to the
original requesting client.

The SoapServer WSDL should be protected from removal.



Reproduce code:
---------------
<?php
ini_set('soap.wsdl_cache_enabled', 1);
ini_set('soap.wsdl_cache', 3);

function test($x)
{
    $client1 = new SoapClient("http://some.other.host/client1.wsdl";);
    $client2 = new SoapClient("http://some.other.host/client2.wsdl";);
    $client3 = new SoapClient("http://some.other.host/client3.wsdl";);
    $client4 = new SoapClient("http://some.other.host/client4.wsdl";);
    $client5 = new SoapClient("http://some.other.host/client5.wsdl";);

    return $x; //web server segfaults or corrupt XML returned
}

$server = new SoapServer("server.wsdl");
$server->addFunction("test");
$server->handle();
?>

Expected result:
----------------
A valid XML response as defined by server.wsdl.

Actual result:
--------------
Either a segmentation fault on the web server and a "Could not fetch
HTTP headers" error on the client, or a corrupted XML response.


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


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

Reply via email to