Page 1 of 1
CSS causing Premature end of script header error
Posted: Sun Mar 07, 2010 4:46 pm
by FlyingShoes12
I am writing a CGI PHP script to handle a simple form. However, I am also using a CSS for the html-based output. I am getting the error:
Code: Select all
Premature end of script headers: SA.css, referer: http://192.168.1.15/cgi-bin/form.php
because of the line:
Code: Select all
<link rel="stylesheet" type="text/css" href="SA.css">
form.php is the script that is getting the error.
Thanks in advanced for any help.
Re: CSS causing Premature end of script header error
Posted: Sun Mar 07, 2010 8:30 pm
by Griven
Tags that do not have a corresponding end must include a slash at the end.
Code: Select all
<link rel="stylesheet" type="text/css" href="SA.css" />
Try that.
Re: CSS causing Premature end of script header error
Posted: Sun Mar 07, 2010 9:28 pm
by FlyingShoes12
Thanks but no go. I'm using HTML not XHTML, so I don't need to close ( I tried it anyway, but with no luck).
Re: CSS causing Premature end of script header error
Posted: Sun Mar 07, 2010 9:43 pm
by Weirdan
FlyingShoes12 wrote:I am writing a CGI PHP script to handle a simple form. However, I am also using a CSS for the html-based output. I am getting the error:
Code: Select all
Premature end of script headers: SA.css, referer: http://192.168.1.15/cgi-bin/form.php
because of the line:
Code: Select all
<link rel="stylesheet" type="text/css" href="SA.css">
form.php is the script that is getting the error.
Your server tries to run the css file like it was a cgi script. Move it out of the /cgi-bin/ folder, and make sure it's not executable (chmod a-x SA.css)
Re: CSS causing Premature end of script header error
Posted: Sun Mar 07, 2010 10:11 pm
by FlyingShoes12
Perfect it works thank you this has been driving me nuts.