#35677 [Asn->Bgs]: Using PDO with SOAP (Webservices) causes errors.
ID: 35677
Updated by: dmitry@php.net
Reported By: prefab5 at hotmail dot com
-Status: Assigned
+Status: Bogus
Bug Type: SOAP related
Operating System: Windows
PHP Version: 5CVS-2005-12-15 (snap)
Assigned To: dmitry
New Comment:
You tries to make object of "persistenceTestServer" - persistent, but
the object contains PDO object that cannot be serialized/unserialized.
This is the reason of error on SOAP server side. The errors occurs
during serialzation of sessiondata (on request shutdown), and this kind
of error cannot be catched by ext/soap to send SOAP Fault.
I recommend move PDO object from the "persistenceTestServer" class or
add __sleep() and __wakeup() magic methods to handle it.
Previous Comments:
------------------------------------------------------------------------
[2005-12-17 15:13:45] prefab5 at hotmail dot com
The file with the example scripts in it can now be found somewhere
else:
http://www.sidemedia.nl/mindstix/persistenceTestServer.zip
------------------------------------------------------------------------
[2005-12-15 10:33:55] prefab5 at hotmail dot com
Description:
------------
When connecting to a SoapServer that also includes PDO to create a
database connection, the SoapServer stops sending SOAP-ENV resulting in
a "Fatal error: Uncaught SoapFault exception: [Client] looks like we got
no XML document in..."
Using mysqli to connect to a database within the SoapServer (you
actually call PDO/mysqli from within the class that the SoapServer
uses) works fine and directly calling the class itself also causes no
problems.
PHP doesn't crash, but sometimes Apache (2.0.55) does.
Reproduce code:
---------------
http://www.mindstix.com/persistenceTestServer.zip
Expected result:
----------------
Count: 1
Count: 2
Count: 3
Actual result:
--------------
Fatal error: Uncaught SoapFault exception: [Client] looks like we got
no XML document in C:\test\webservices\persistenceTestClient.php:6
Stack trace: #0 [internal function]: SoapClient->__call('count', Array)
#1 C:\test\webservices\persistenceTestClient.php(6): SoapClient->count()
#2 {main} thrown in C:\test\webservices\persistenceTestClient.php on
line 6
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35677&edit=1
Thread (6 messages)