php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36395 Putting a SoapClient into Session causes the client to no longer work.
Submitted: 2006-02-15 01:48 UTC Modified: 2006-02-15 08:22 UTC
From: trannicholas at yahoo dot com Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.1.2 OS: Windows XP
Private report: No CVE-ID:
 [2006-02-15 01:48 UTC] trannicholas at yahoo dot com
Description:
------------
I am seeing some weirdness after setting the SoapClient in the session and then retrieveing it in another page.

On the second page, I can retrieve the SoapClient from the session, but as soon as I access a method on the SoapClient, I get this error.

"Warning: SoapClient::__call(): supplied argument is not a valid sdl resource in welcome.php on line 18
There was a problem with your login: Error finding "uri" property"

I notice during debugging that the attributes sdl (originally :6) and httpurl (originally :8) become 0's after the redirect.  Everything else (location, __default_headers0 look the same. 

Reproduce code:
---------------
First php page:

session_start()
$soapclient = new SoapClient('some?WSDL');
$result = $soapclient->someOperation();
$_SESSION['client'] = $soapclient ; 


Second php page:
session_start()
$client= $_SESSION['client'];
try {
  $result = $soapclient->someOperation();
  echo $result;
} catch (exception $e) {
  echo $e;
}

Expected result:
----------------
Result

Actual result:
--------------
"Warning: SoapClient::__call(): supplied argument is not a valid sdl resource in welcome.php on line 18
There was a problem with your login: Error finding "uri" property"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-15 08:22 UTC] tony2001@php.net
It is not possible to serialize PHP built-in objects. 
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 20:02:01 2014 UTC