Hi i am using a script that is giving me XML Error: empty document at line 1 whenever i run a certain function to pull info from another site. The problem is not the script as i know many many others that have it and it works for them. The problem seems to be server configuration. Anyone have any idea what could cause this type of a problem? I cant show you the code for the function as the script is encyrpted and therefore i cant even see it. But I do know what it does is access the DirectTrack system and pull leads from it into my script. The problem is when i initiate that which in the script is called Run Direct Track Crediting Here is the output it is giving me when ran ( [client] => aquasismedia [add_code] => ****** [password] => ******* [start_date] => 2008-12-30 [end_date] => 2009-01-09 ) ?xml version=1.0 encoding=utf-8? item optstats Date12/31/2008/Date Campaign Amazing Web Store/Campaign ProgramID510/ProgramID Infoone-7068/Info AmountLEAD N/A/Amount TransactionIDLEAD N/A/TransactionID Commission$37.00/Commission/optstats optstats Date12/31/2008/Date Campaign Amazing Web Store/Campaign ProgramID510/ProgramID Infoone-7063/Info AmountLEAD N/A/Amount TransactionIDLEAD N/A/TransactionID Commission$37.00/Commission/optstats optstats Date01/05/2009/Date Campaign Amazing Web Store/Campaign ProgramID510/ProgramID Infoxbo-7112/Info AmountLEAD N/A/Amount TransactionIDLEAD N/A/TransactionID Commission$37.00/Commission/optstats optstats Date01/06/2009/Date Campaign Amazing Web Store/Campaign ProgramID510/ProgramID Infoesc-7142/Info AmountLEAD N/A/Amount TransactionIDLEAD N/A/TransactionID Commission$37.00/Commission/optstats optstats Date01/05/2009/Date Campaign eSuccess2u.com/Campaign ProgramID518/ProgramID Infoxbo-7108/Info AmountLEAD N/A/Amount TransactionIDLEAD N/A/TransactionID Commission$36.00/Commission/optstats /item XML error: Empty document at line 1 this is what the script creator is telling me: The system is able to log-in to Aquasis just fine and pull the XML for the credits that have yet to be processed. However, the XML isn't formed correctly. What I believe is happening is your server is actually stripping out all of the <>'s (most likely being represented in ASCII form: <. From checking your configuration, I'm not exactly sure what setting needs to change Anyone can please help. That would be great. you can look at my server test and phpinfo here http://www.asafreebie.com/server-test.php
yes, without the <>'s it's not valid XML and thus the script won't process it. To find the cause, we need more info: where exactly is the script located, as a file or in database ...? how is it processed? If you open the script in a text editor, do you see strings like "lt;" or the <>'?
It's a file doesnt go through a DB. When the server parses XML it stripes those and then the script gives an error. Im not sure how its processed but I assume just through the servers xml parser i cant open the script its encrypted.
Sorry, I meant the original XML, do have access to it? If you open it do you see "<" or ">" ? What server is it exactly, what xml parser?
norbert. no i dont it comes through Directrack not sure exactly how its pulled but its pulled from their site. I know the problem doesnt lye with the actual xml though because i know of others that are not having this problem. The problem is with my server and it striping those <> when it pulls it
ok, about what server and xml parser are we taking about? operating system, log files, documentation, where/how can this server be configured, is there a user-interface, etc. ?
here is my server info: Server Information Processor Information Processor #1 Vendor: GenuineIntel Processor #1 Name: Intel(R) Xeon(R) CPU X3220 @ 2.40GHz Processor #1 speed: 2394.000 MHz Processor #1 cache size: 4096 KB Processor #2 Vendor: GenuineIntel Processor #2 Name: Intel(R) Xeon(R) CPU X3220 @ 2.40GHz Processor #2 speed: 2378.000 MHz Processor #2 cache size: 4096 KB Processor #3 Vendor: GenuineIntel Processor #3 Name: Intel(R) Xeon(R) CPU X3220 @ 2.40GHz Processor #3 speed: 1596.000 MHz Processor #3 cache size: 4096 KB Processor #4 Vendor: GenuineIntel Processor #4 Name: Intel(R) Xeon(R) CPU X3220 @ 2.40GHz Processor #4 speed: 1596.000 MHz Processor #4 cache size: 4096 KB Memory Information System Information Linux ds1.bewebhosting.com 2.6.21.5-hostnoc-3.1.7-libata-grsec-32 #1 SMP Mon Feb 11 06:36:58 EST 2008 i686 i686 i386 GNU/Linux Physical Disks Current Memory Usage total used free shared buffers cached Mem: 2063564 1987508 76056 0 353256 1029652 -/+ buffers/cache: 604600 1458964 Swap: 2040212 172 2040040 Total: 4103776 1987680 2116096 Current Disk Usage Filesystem Size Used Avail Use% Mounted on /dev/sda5 2.0G 383M 1.5G 21% / /dev/sda1 99M 24M 70M 26% /boot tmpfs 1008M 0 1008M 0% /dev/shm /dev/sda8 202G 32G 160G 17% /home /dev/sda6 996M 35M 910M 4% /tmp /dev/sda3 9.7G 3.5G 5.8G 38% /usr /dev/sda2 9.7G 1.3G 8.0G 14% /var you can also view phpinf() via this server test script i have on there. http://www.asafreebie.com/server-test.php It is setup and configured via WHM but since its a dedicated server SSH is also available.
bennettelec, I was doing some research but unfortunately I did't see anything that could be a potential cause for your problem. I think it's best to directly contact the creators of the tgpx server.