ID: 36388
Updated by: [EMAIL PROTECTED]
Reported By: david at jool dot nl
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: winxp
PHP Version: 5CVS-2006-02-14 (snap)
-Assigned To:
+Assigned To: dmitry
Previous Comments:
------------------------------------------------------------------------
[2006-02-14 11:15:27] david at jool dot nl
Description:
------------
When using the soap extension to expose a certain class and setting the
persistence to SOAP_PERSISTENCE_SESSION, PHP crashes when I throw an
Exception.
Reproduce code:
---------------
<?php
class test1 {
function soapFunction($param) {
throw new Exception("something went wrong");
return "blaat aap: ". $param;
}
}
if($_GET["type"]=="server") {
$server = new SOAPServer(null, array("uri"=>
"http://some.example.uri/"));
$server->setClass("test1");
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
$server->handle();
} else { //client
$client = new SOAPClient(null, array('location' =>
'http://'.$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"].'?type=server',
'uri'=> 'http://some.example.uri/'));
$res = $client->__call("soapFunction", array("hey!"));
var_dump($res);
}
?>
Expected result:
----------------
Fatal error: Uncaught SoapFault exception: [Client] looks like we got
no XML document in f:\myweb\contentarea\tests\bug_exception.php:15
Stack trace: #0 f:\myweb\contentarea\tests\bug_exception.php(15):
SoapClient->__call('soapFunction', Array) #1 {main} thrown in
f:\myweb\contentarea\tests\bug_exception.php on line 15
Actual result:
--------------
PHP / Apache crash
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36388&edit=1