php.net |  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
 [2004-09-06 16:23 UTC] kore at mindwipe dot org
Description:
------------
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:
---------------
<?php
$client = new SoapClient("http://xml.whereisthatip.com/ip-location-service.wsdl");

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

echo "$queryresult\n";;
?>

Expected result:
----------------
US


Actual result:
--------------
Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] SOAP-ERROR: Encoding: string '192.48.96.9' 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-06 17:07 UTC] rrichards@php.net
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 http://www.php.net/support.php 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-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC