homepage Welcome to WebmasterWorld Guest from 54.161.185.244
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Debugging CGI script
What is wrong
neiljones

10+ Year Member



 
Msg#: 4390 posted 10:56 pm on Mar 6, 2006 (gmt 0)

I am having the standard problem of just getting the premature end of headers error message which explains nothing.

I have cut down a script as far as this

#!/usr/bin/perl -w
print "<html> Hello </html>"

It still gives the same error. I think permissions are OK and the script runs on the command line.

Can anyone tell me how to get decent error messages out of the system or what the problem is likely to be and how to fix it.

 

coopster

WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4390 posted 12:05 am on Mar 7, 2006 (gmt 0)

There's always the server error logs --

You need to let the browser know what's coming first.

print "Content-type: text/html\n\n";

moltar

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4390 posted 11:39 am on Mar 8, 2006 (gmt 0)

use CGI::Carp [search.cpan.org] qw(fatalsToBrowser);
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved