From: falk dot herrmann at bike24 dot net Operating system: Linux 2.6.23 PHP version: 5.2.5 PHP Bug Type: SOAP related Bug description: soap server not persistence
Description: ------------ A soap server with SOAP_PERSISTENCE_SESSION is not persistence if the class Bar extends class Foo and the class Foo was included via include() or required(). If the class Foo is directly in the server code file (server.php), soap server works correct. Reproduce code: --------------- server.php ========== <?php session_name('PSESSION'); if ( $_COOKIE['PSESSION'] ) { session_id($_COOKIE['PSESSION']); } $res = session_start(); require('Foo.php'); class Bar extends Foo { public $var = 0; public function login() { return session_id(); } public function incVar() { $this->var++; return $this->var; } } $server = new SoapServer(NULL, array('uri' => 'http://localhost/')); $server->setClass('Bar'); $server->setPersistence(SOAP_PERSISTENCE_SESSION); $server->handle(); ?> client.php ========== <?php # Soap client $client = new SoapClient(NULL, array( "location" => "http://localhost/server.php", "uri" => "urn:xmethodsTest", 'trace' => 1 )); # SOAP requests try { $session = $client->login(); $client->__setCookie('PSESSION', $session); print $client->incVar(); print "\n"; print $client->incVar(); print "\n"; print $client->incVar(); print "\n"; print $client->incVar(); print "\n"; print $client->incVar(); print "\n"; } catch (SoapFault $sf) { # ... } ?> Foo.php ======= <?php class Foo { } ?> Expected result: ---------------- 1 2 3 4 5 Actual result: -------------- 1 1 1 1 1 -- Edit bug report at http://bugs.php.net/?id=44267&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44267&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44267&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44267&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44267&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44267&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44267&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44267&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44267&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44267&r=support Expected behavior: http://bugs.php.net/fix.php?id=44267&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44267&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44267&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44267&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44267&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44267&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44267&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44267&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44267&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44267&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44267&r=mysqlcfg