Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

SimpleXML Encoding issue



9:02 am on Jul 22, 2011 (gmt 0)

5+ Year Member


I have 2 web servers, both running Apache but with differing results for a PHP simple_xml_loadfile issue.

The call is something like
$xml = simple_xml_loadfile("http://www.test.com/test.php?id=1234&code=yyyy);

On server 1 I run the script and the remote server receives the correct request.

On server 2 the ampersands seem to get encoded to & and the remote server responds with an error as it's not in the format expected.

I have tried html_entity_decode on the string before it leaves my script but still the remote server receives the encoded version of the request.

Can anyone highlight a setting in Apache (or elsewhere) that would cause this scenario please?

Many thanks


11:00 am on Jul 25, 2011 (gmt 0)

5+ Year Member

To clarify this the second server (the one with the fault) seems to be automatically adding htmlspecialchars encoding to the request URL automatically

Is there a setting that would do this automatically? It's a centos 5.5 box if that helps.


Featured Threads

Hot Threads This Week

Hot Threads This Month