#44267 [Opn]: soap server not persistence

2008-05-18 Thread falk dot herrmann at bike24 dot net
 ID:   44267
 User updated by:  falk dot herrmann at bike24 dot net
 Reported By:  falk dot herrmann at bike24 dot net
 Status:   Open
 Bug Type: SOAP related
 Operating System: Linux 2.6.23
 PHP Version:  5.2.5
 New Comment:

It seems that the code work with PHP 5.2.6


Previous Comments:


[2008-05-18 08:15:19] glenn at webmind dot be

Having the same problem here.



[2008-04-20 16:17:34] davy dot defaud at free dot fr

I experienced the same problem on the same version 5.2.5, for a 2.6.24
kernel both on a i586 and a x86_64 systems (but I don't think it's
system related).
I already had this problem with an old 5.0.4 PHP but my code was
working on a 5.2.1 including Suhosin so I was confident that it would
work on my brand new mandriva 2008.1 server with the latest PHP, but it
doesn't :-(
This is a really critical bug for those using PHP as a SOAP server.
We really need a quick fix.



[2008-02-27 14:25:18] falk dot herrmann at bike24 dot net

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 this bug report at http://bugs.php.net/?id=44267edit=1



#44267 [NEW]: soap server not persistence

2008-02-27 Thread falk dot herrmann at bike24 dot net
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=44267edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44267r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44267r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44267r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44267r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44267r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44267r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44267r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44267r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=44267r=support
Expected behavior:http://bugs.php.net/fix.php?id=44267r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=44267r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=44267r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44267r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44267r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44267r=dst
IIS Stability:http://bugs.php.net/fix.php?id=44267r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=44267r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44267r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=44267r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=44267r=mysqlcfg