PDA

View Full Version : Help with cgi apache error



Jimmy_1020
05-27-2011, 10:12 PM
Hello.

I have recently been learning to write CGI scripts using PERL. I Have also just set up Apache on my mac.

I configured my httpd.conf file to allow CGI and PHP including doing the following to enable CGI scripts to run from my directory folder:

<Directory />
Options +ExecCGI
AllowOverride None
Order deny,allow
Deny from all
</Directory>

my server seems to be working alright, but the problem i am having is when i go to run some of my CGI scripts I get the following error:

[error] [client ::1] (2)No such file or directory: exec of '/Library/WebServer/Documents/projectthread/dynamic_form.cgi' failed,

[error] [client ::1] Premature end of script headers: dynamic_form.cgi,

I have been wondering if this is maybe a problem with the CHMOD settings of these files, or the fact that I wrote some of the code on a P.C. (not by choice) Have tried a few things but nothing seems to be working.

the CGI file I am trying to execute requires access to a cgi functions lib in a separate folder and also access to text files for reading and writing purposes.

If any body could offer any advice it would be much appreciated.