|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29999 SOAP complains about strings not being valid utf-8
Submitted: 2004-09-06 16:23 UTC Modified: 2004-09-06 17:07 UTC
From: kore at mindwipe dot org Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.0.1 OS: linux
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: kore at mindwipe dot org
New email:
PHP Version: OS:


 [2004-09-06 16:23 UTC] kore at mindwipe dot org
php complains about string not being valid utf-8. Now the code works with 5.0.0 compiled against libxml2-2.6.13 but not with 5.0.1. It's the function xmlCheckUTF8 (in libxml2) that returns the value causing the error message.

Reproduce code:
$client = new SoapClient("");

$queryresult = $client->getLocationRequest("");

echo "$queryresult\n";;

Expected result:

Actual result:
Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] SOAP-ERROR: Encoding: string '' is not a valid utf-8 string in /data/www/PRO/html/pcs/test.php:5
Stack trace:
#0 /data/www/PRO/html/pcs/test.php(5): SoapClient->getLocationRequest('getLocationRequ...', Array)
#1 {main}
  thrown in /data/www/PRO/html/pcs/test.php on line 5


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-06 17:07 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

xmlCheckUTF8 is broken in libxml2-2.6.13. Either use an older version or the latest from cvs where it's been fixed.
 [2004-09-07 08:23 UTC] luis at infomed dot sld dot cu
I downgrade to libxml2-2.6.8 and OK.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 01:03:48 2022 UTC