For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > November 2004 > cgi script only runs with -w option









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cgi script only runs with -w option
Alan Powell

2004-11-04, 8:55 am

I have hunted around via Google etc and cannot find a solution to
this.........

The minimum shebang that will allow any of my scripts to run is: -

#!/usr/bin/perl -

If I have: -

#!/usr/bin/perl

Output error is: -

The server encountered an internal error and was unable to complete your
request. Error message:
The server encountered an internal error and was unable to complete your
request. Either the server is overloaded or there was an error in a CGI
script.

I can also run with: -

#!/usr/bin/perl -wT or indeed
#!/usr/bin/perl -T

The system is (from a cgi script!!): -

Apache/2.0.40 (Red Hat Linux) mod_perl/1.99_07-dev Perl/v5.8.0
mod_auth_pgsql/0.9.12 PHP/4.2.2 mod_python/3.0.1 Python/2.2.2 mod_ssl/2.0.40
OpenSSL/0.9.7a DAV/2

My apache error log doesn't help any further than the browser output, and by
perl -c checking the syntaxes everything checks ok, so why do I need that
vital "-" at the shebang?

Anyone had similar experience and solved this please??

Regards

Alan Powell



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com