ID:               34746
 User updated by:  brent at jeneral dot com
 Reported By:      brent at jeneral dot com
-Status:           No Feedback
+Status:           Open
 Bug Type:         SOAP related
 Operating System: Freebsd 5.4
 PHP Version:      5.0.5
 New Comment:

The workaround is to change all

#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)

back to 

#if HAVE_PHP_SESSION

in soap.c

I agree that this is an ongoing issue.  It seems as though there's an
unresolved "discussion" as to who owns the problem.


Previous Comments:
------------------------------------------------------------------------

[2005-11-02 00:59:11] mir at miras dot org

Hi,

I would like this to be reopened because I have the same problems:

loke:~/Projekter/php/soap/basic$ dpkg -s php5.0
Package: php5.0
Status: install ok installed
Priority: optional
Section: interpreters
Installed-Size: 20
Maintainer: Piotr Roszatycki <[EMAIL PROTECTED]>
Architecture: all
Version: 5.0.5-0.8
Provides: php5

Server:
<?php
    session_start();
    class HelloServer {
        private $count;

        function __construct() {
            $this->count = 0;
        }

        function sayhello() {
            $this->count++;
            return $this->count;
        }
    }
    $options = array("uri" => "http://test-uri/";);
    $server = new SoapServer(NULL, $options);
    $server->setClass("HelloServer");
    $server->setPersistence(SOAP_PERSISTENCE_SESSION);
    $server->handle();
?>

Client:
<?php

    function format($s)
    {
        $s = str_replace("><", ">\n<", $s);
        return "<pre>" . htmlspecialchars($s) . "</pre>";
    }

    print "<html><head><title>Session Test</title></head><body>";
    $option = array(
        "location" =>
"http://localhost/~mir/soap/php5/session/soapSessionServer.php";,
        "uri" => "http://test-uri/";,
        "trace" => 1);
    $client = new SoapClient(NULL, $option);
    $arg = array();
    try
    {
        $response = $client->__soapCall("sayhello", $arg);
        print "<p>Response:<br>$response</p>";
    }
    catch(SoapFault $sf)
    {
        print "<p>Response:<br>" . $sf->getMessage() . "</p>\n";
    }

    print format($client->__getLastRequestHeaders()) . "\n";
    print format($client->__getLastRequest()) . "\n";
    print format($client->__getLastResponseHeaders()) . "\n";
    print format($client->__getLastResponse()) . "\n";
    print "</body></html>";
?>

Output - first time rune:
HTTP/1.1 200 OK
Date: Tue, 01 Nov 2005 23:05:25 GMT
Server: Apache/2.0.55 (Debian) mod_python/3.1.3 Python/2.3.5
PHP/5.0.5-Debian-0.8 mod_perl/2.0.1 Perl/v5.8.7
X-Powered-By: PHP/5.0.5-Debian-0.8
Set-Cookie: PHPSESSID=c6d215abd0930d3c48bb82dc9645b8ea; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Length: 505
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset=utf-8

Output - second time:
HTTP/1.1 200 OK
Date: Tue, 01 Nov 2005 23:23:09 GMT
Server: Apache/2.0.55 (Debian) mod_python/3.1.3 Python/2.3.5
PHP/5.0.5-Debian-0.8 mod_perl/2.0.1 Perl/v5.8.7
X-Powered-By: PHP/5.0.5-Debian-0.8
Set-Cookie: PHPSESSID=94b0f37c8de99c263a74b3f657d12f3a; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Length: 505
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset=utf-8

As can be seen the session id changes for every call. Looking for the
cookie on the client shows the problem - the cookie is never stored on
the client so succeding invocations does not send any session id back
which causes the server to think this is a new session.

------------------------------------------------------------------------

[2005-10-21 01:00:05] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2005-10-17 21:06:56] justin at eckhouse dot com

I seem to be having the same issue, both with 5.0.5 and 5.1RC1 when
using SOAP_PERSISTENCE_SESSION.

- Justin

------------------------------------------------------------------------

[2005-10-13 10:55:07] [EMAIL PROTECTED]

I don't get how changing this line can help to fix the problem.
Imagine that you've build PHP with SOAP enabled and after that you've
additionally built session module.
Both of them would be available, but SOAP wouldn't know about session.

>In FreeBSD all extensions are dinamically loaded, so the 
>persistence session support cannot work anymore.
This is the weirdest way to build PHP I've seen, which creates a lot of
troubles for users and doesn't solve any problems.
I've already saw a lot of confusion from FreeBSD users that install PHP
and discover that none of the modules (that are usually enabled by
default) are there.

------------------------------------------------------------------------

[2005-10-13 08:19:15] ale at FreeBSD dot org

I think the problem is this: in soap.c you changed all the following
rows

#if HAVE_PHP_SESSION

with

#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)

In FreeBSD all extensions are dinamically loaded, so the persistence
session support cannot work anymore. Moreover, in FreeBSD, extensions
can use code provided by other shared extensions (like session.so in
this case), so this check is actually a limitation for us.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/34746

-- 
Edit this bug report at http://bugs.php.net/?id=34746&edit=1

Reply via email to