Gossamer Forum
Home : General : Perl Programming :

Premature end of script headers

Quote Reply
Premature end of script headers
I believe that my host has tried to resolve the problem with executing Perl scripts, but now get a new error, the script is as follows, along with the log file that is generated from the server. As far as I can see there is nothing wrong from this basic script and debugs all ok, any suggestions would be much appreciated.

Code:
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "<HTML><HEAD>";
print "<TITLE>CGI Test</TITLE>";
print "</HEAD>";
print "<BODY><H2>I just wrote a web page using Perl!</H2>";
print "</BODY></HTML>";
From the server error log
[Sun May 16 23:48:29 2004] [error] [client 219.3.228.42] Premature end of
script headers:
/home/fhlinux196/c/causeandfx.org.uk/user/htdocs/cgi-bin/hello.cgi
Quote Reply
Re: [TokyoJon] Premature end of script headers In reply to
Not being funny... but if your "host" can't even get Perl to work right, I don't think they can really call themselves an ISP. I've only ever heard of a couple of ISP's who do this, and both of them have been pretty bad customer support. Not sure how yours is.. but if they can't get it to work, I would seriously consider moving, as no Perl, limits your site to PHP and basic HTML pages Frown

The script you posted looked absolutly fine, and shouldn't cause 500 IS Errors.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [TokyoJon] Premature end of script headers In reply to
What are the permissions on the file? Try 755 and see if that helps. If not, I 2nd what Andy said.

~Charlie
Quote Reply
Re: [Chaz] Premature end of script headers In reply to
Thanks to both, I am now looking for a new server, as www.streamlinenet.co.uk wont even reply to my emails asking for help. I will not recommend them to anyone, and will now place a note on my site warning others of the so called 24/7 technical support.

Do you have any suggestions as to a good server for perl scripts, specially chat room.
Quote Reply
Re: [TokyoJon] Premature end of script headers In reply to
A couple of good ones are;

http://www.gossamerhost.com - I'm with GH now... top notch stuff, with a nice variety of cool admin panel details :)
http://www.imagelinkusa.net - used to be with them, and was very happy with the service/support.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!