PHP v5.3 to v5.4 Upgrade causes XML Extra Content Error

I’ve been testing a PHP upgrade from 5.3.10 to 5.4.9 All my applications work well with 5.3; not so with 5.4

v5.3 gives me proper formatted xml content; all grids show data correctly.

v5.4 gives the following error instead:

This page contains the following errors:
error on line 2 at column 1: Extra content at the end of the document

The xml data is created by: $conn->render_sql($sql,$ndx,$col);

Try to use the latest version of lib
github.com/DHTMLX/connector-php … master.zip

Is issue still occurs - please try to enable logging and provide log file content.
docs.dhtmlx.com/doku.php?id=dhtm … tor:errors

The same problem . I’m getting error : This page contains the following errors:
error on line 1 at column 82: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.

Copied this line : 82 column is tid value .
?xml version=“1.0” encoding=“iso-8859-1”?><?xml version='1.0' encoding='utf8' ?>

Works correctly locally with PHP 5.4.4
Will test with PHP 5.4.9 and post results here.

Just checked with latest php 5.4.11 - there is no such problems
Do you have problem with default samples, or with some custom code ?

Just checked : php - 5.3.13 , Apache - 2.2.22 , MySql - 5.5.24 . Wamp server 2.2 . Standard grid with connector and php . Maybe it’s related with other things …

error on line 2 at column 1: Extra content at the end of the document

It possible that you are including some other scripts ( such as db configuration for example ) in connector script, and they can throw some warning which will break xml parsing

My problem had nothing to do with the connector but a change in behavior between PHP 5.3 and 5.4, and sloppy / lazy programming on my side a few weeks ago.

In this case; I called a function which required 6 arguments with only 5 arguments, without a default setting for the 6th argument. This apparently worked fine in 5.3; not so in 5.4

Chrome error: error on line 2 at column 1: Extra content at the end of the document

IE10 error: Warning: Missing argument 6 for …

The latter was much more useful of course…

PHP 5.4.9, IIS 7.5, SQL Server 2012