View previous topic :: View next topic |
Author |
Message |
sKewlBoy Guru
Joined: 03 Nov 2002 Posts: 406 Location: Portugal
|
Posted: Mon Dec 23, 2002 3:01 pm Post subject: Apache and CGIs |
|
|
I want to be able to run CGIs everywhere. I know I have to allow ExecCGI and SetHandler cgi-script. And I've done it. But kept getting error 500.
I decided to try the user cgi-bin example in commonapache2.conf. I copied /home/httpd/cgi-bin/printenv to ~user/public_html/cgi-bin/printenv.cgi and still get 500.
Checking error.log it say prematura end of headers but that must be a general a error... I dont know what to do...
When I had apache 1.3.24 it all worked so well... The following version became so complicated ... =\ |
|
Back to top |
|
|
vericgar Retired Dev
Joined: 13 Dec 2002 Posts: 79 Location: Spokane, WA
|
Posted: Wed Dec 25, 2002 5:39 am Post subject: |
|
|
Check the first line of the script to make sure it's a valid path, something like the following:
#!/usr/bin/perl
Also make sure it's in Unix text format and not DOS text format (i.e. ASCII mode when uploading via FTP)
Check the permissions, make sure they are executable, ie. 755 rwxr-xr-x
Check the error logs, it should give a more informative error.
Check to see if you are using suexec (there will be a message in the logs) if so, read up on it and troubleshooting it over on the apache website http://httpd.apache.org. _________________ +~+ Sometimes a good ole loving kick is all it needs +~+ |
|
Back to top |
|
|
sKewlBoy Guru
Joined: 03 Nov 2002 Posts: 406 Location: Portugal
|
Posted: Wed Dec 25, 2002 3:49 pm Post subject: |
|
|
I said I copied printenv (that default script) so you wouldnt have to say those basic lines line the interpreter path, permissions and so on...
But the tip on suexec is good, because I know it's on...
Thanks |
|
Back to top |
|
|
|