|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35677 Using PDO with SOAP (Webservices) causes errors.
Submitted: 2005-12-15 10:33 UTC Modified: 2005-12-21 09:56 UTC
From: prefab5 at hotmail dot com Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5CVS-2005-12-15 (snap) OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: prefab5 at hotmail dot com
New email:
PHP Version: OS:


 [2005-12-15 10:33 UTC] prefab5 at hotmail dot com
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:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-17 15:13 UTC] prefab5 at hotmail dot com
The file with the example scripts in it can now be found somewhere else:
 [2005-12-21 09:56 UTC]
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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 03:01:28 2024 UTC