Discussion Locked

CGI Scripts and "-w" switch

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have been having lots of problems with CGI scripts (I use LINUX/Apache webserver). Finally I was able to get the simple "Hello World!" script to run but only if I put the "-w" at the end of the Perl call line:

#!/usr/bin/perl -w

Why is thiscausing such a problem for me? I fear that it will cause me lots of problems if I continue my development without finding the cause. Please help!!!!

2 replies

by melodyj

What error message did you have before adding the -w? A good place to look is your error log - /var/log/error_log. That should help you track down the problem. If not, please post the actual message here and I'll try to help further.

Regards,
Melody

by Member 24975231

This is the errors (from the log) that I get without the "-w" switch:

[Sun Jul 2 22:41:38 2000] [error] (2)No such file or directory: exec of /home/httpd/cgi-bin/helloworld.cgi failed
[Sun Jul 2 22:41:38 2000] [error] [client 128.2.26.233] Premature end of script headers: /home/httpd/cgi-bin/helloworld.cgi

This discussion is closed to new replies.