From: Operating system: FreeBSD 6.2 PHP version: 5.3.2 Package: SOAP related Bug Type: Bug Bug description:SOAP_PERSISTENCE_SESSION doesnt work if server class is included from external
Description: ------------ If server class is included / required (or included/required once) from external file the persistence doesn't work. I think that the BUG is related to already reported bugs #51561 and #44267. Test script: --------------- 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) { echo "<PRE>"; echo $sf; } ?> server.php -------------- <?php session_name('PSESSION'); if ( $_COOKIE['PSESSION'] ) { session_id($_COOKIE['PSESSION']); } $res = session_start(); require('class.bar.php'); $server = new SoapServer(NULL, array('uri' => 'http://193.59.86.29/')); $server->setClass('Bar'); $server->setPersistence(SOAP_PERSISTENCE_SESSION); $server->handle(); ?> class.bar.php -------------- <?php class Bar { public $var = 0; public function login() { return session_id(); } public function incVar() { $this->var++; return $this->var; } } ?> Expected result: ---------------- 1 2 3 4 5 Actual result: -------------- 1 1 1 1 1 -- Edit bug report at http://bugs.php.net/bug.php?id=52058&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52058&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52058&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52058&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52058&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52058&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52058&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52058&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52058&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52058&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52058&r=support Expected behavior: http://bugs.php.net/fix.php?id=52058&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52058&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52058&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52058&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52058&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52058&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52058&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52058&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52058&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52058&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52058&r=mysqlcfg