Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael Chetock on Oct 13, 2008 07:25
open dhtmlx forum
dhtmlxDataProcessor - Mozilla Firefox 3 - PHP __autoload()

I am using Mozilla Firefox 3 and PHP with the dhtmlxGrid and dhtmlxDataProcessor.

I am loading the dhtmlxGrid with loadXML() function;

Lets say I have the following line of code:
loadXML('get.php');

In all of my pages I have include_once("globals.php") because the globals.php file contains an __autoload function so that I can instantiate my PHP objects easily.

However, when my get.php file includes the globals.php file I get "Error Type LoadXML, Description: Incorrect XML". It seems as though __autoload() is causing invalid output.

When I remove the globals.php file which has the __autoload function, and instead I simply include each of the files I need to include for creating my objects, the xml populates the grid correctly with no error.

I only get the error in Mozilla Firefox, I do not get the error in Internet Explorer. Is there something going on with headers? Is there something I can do so that I can keep using __autoload?



Answer posted by Support on Oct 13, 2008 08:46
>>Is there something going on with headers? Is there something I can do so that I can keep using __autoload?
In case of FF there must not be any output before <?xml declaration. Most probably you have some whitespace or newline in globals.php outside of <?php ?> code. Such whitespace goes in output before <?xml and break XML parsing in FF

You can 
- find and eliminate unnecessary whitespace in globals.php
or
- just remove <?xml declaration