So this is unusual ... I add 'use strict;' and 'use CGI;' at the top, nothing changes and I still receive the same error. BUT, when they are removed, the script then works fine. WITHOUT changing anything else. Any ideas? On Wed, 18 Dec 2002, Malcolm H. Beaulieu wrote:
I recently compiled Apache (with PHP, SSL, Perl) on a Debian box (I downloaded all the sources BTW) and it has been running fine, for the most part. The recent discussions reminded me that I had been having problems with the perl part of the build. Whenever a script is executed, I receive a "500 Internal Server Error" with the following in the logs:
[DATE] [error] (2)No such file or directory: exec of /usr/local/apache/cgi-bin/test-cgi failed [DATE] [error] [client IP] Premature end of script headers: /usr/local/apache/cgi-bin/test-cgi
The script is actually a stripped down version of my original one (pasted at the end of this email). The permissions are a+rx on the file, the path to perl and the file are correct, the directory is the one defined under ScriptAlias in the httpd.conf and the script executes fine from a prompt, ie 'perl test-cgi'. mod_perl didn't complain about anything and compiled correctly. Does anyone have any ideas about what the problem could be? Thanx in advance for your help!
-Malcolm
=================== BEGIN FILE
#!/usr/bin/perl
print "Content-type: text/html \n\n"; print "<HTML>\n"; print "<HEAD>\n"; print "</HEAD>\n"; print "<BODY BGCOLOR=WHITE>\n\n"; print "<BR><BR>\n\n"; print "<CENTER><H3>Form Error</H3></CENTER><BR>\n"; print "<H2>\nErrors were encountered in the following fields:\n"; print "</BODY>\n"; print "</HTML>\n";
=================== END FILE
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug