Feb 22

SimpleXML does not correctly parse SOAP XML results if the result comes back with colons ‘:’ in a tag, like <soap:Envelope>. Why? Because SimpleXML treats the colon character ‘:’ as an XML namespace, and places the entire contents of the SOAP XML result inside a namespace within the SimpleXML object. There is no real way to correct this using SimpleXML, but we can alter the raw XML result a little before we send it to SimpleXML to parse.
Read More


Feb 4

The Problem:

When you load up the PHP script you just created, you get the following error message:

“Warning: Cannot modify header information - headers already sent by …”

Which is then followed by a file location and line number where the output started, and the file and line number where the error occured (the function call where the header was trying to be sent).

The functions that send HTTP headers that can cause this problem are header() and setcookie().

The Explanation:

This problem occurs when you are trying to send HTTP header information AFTER output to the browser has already been started. The most common occurrence of this error is when you have some code that looks something like the following:
Read More