Welcome! Log In Create A New Profile

Advanced

Switching from apache problem

Posted by ith 
ith
Switching from apache problem
January 26, 2012 09:38AM
Hi,

My very simple php script sends xml content to a browser.

header("Content-Type: text/xml");
print file_get_contents('sample.xml');

After switching from apache to Nginx I started getting the following error:
Error: XML declaration not at beginning of document

1:
2:
3: <?xml version="1.0" encoding="us-ascii"?>
4: <root>
....

It's obvious that something inserts 2 additional lines before the content of the original xml file
and it causes the error. How can I fix it?
ith
Re: Switching from apache problem
January 26, 2012 02:00PM
Oops, I found what inserted those 2 additional lines, fixed.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 126
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready