#36388 [Opn->Asn]: PHP crash when throwing exception and session persistence

From: Date: Tue, 14 Feb 2006 10:28:38 +0000
Subject: #36388 [Opn->Asn]: PHP crash when throwing exception and session persistence
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93245@lists.php.net to get a copy of this message
ID: 36388 Updated by: tony2001@php.net 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

« previous php.bugs (#93245) next »