Koozali.org: home of the SME Server

CGI Scripits not running

Adam

CGI Scripits not running
« on: July 05, 2003, 10:56:26 AM »
Hey all,

I cant get any Cgi scrips to work i just keep getting "Internal Server error" whenever i tri and run a cgi script. i have done chmod and all the setup but just cant get it to run.

Can any one help ?

Chears Adam

Adam

Re: CGI Scripits not running
« Reply #1 on: July 05, 2003, 11:11:11 AM »
Sorry about spelling i mean Scripts

Michael P. Soulier

Re: CGI Scripits not running
« Reply #2 on: July 07, 2003, 03:45:05 AM »
Adam wrote:
>
> Hey all,
>
> I cant get any Cgi scrips to work i just keep getting
> "Internal Server error" whenever i tri and run a cgi script.
> i have done chmod and all the setup but just cant get it to
> run.

Sorry, this isn't a CGI forum. There are many tutorials for CGI scripting on the internet if you search for them in google.

Mike

highleaf

Re: CGI Scripits not running
« Reply #3 on: July 07, 2003, 04:18:37 AM »
Have you edit your file on win or linux ?
Have you done your transfert in ASCII by FTP ?
Have you given the good path of your Perl or Python exec ?

Barry Fitzmaurice

Re: CGI Scripits not running
« Reply #4 on: July 08, 2003, 05:54:31 PM »
Have you allowed dynamic content to be run on that i-bay?

Barry

Greg Allt

Re: CGI Scripits not running
« Reply #5 on: August 01, 2003, 02:57:06 AM »
I'm having that same problem.

Have create a perl script.  Can get it to execute direcly from the command line

ie:

[root@e-smith cgi-bin]# ./myscript.pl

and it executes as I expect.

When I execute if via a web browser

ie

http:///intranet/cgi-bin/myscript.pl

I receive the message
/---------------------------------------------------------------------------------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@allt.homeip.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

--------------------------------------------------------------------------------------------------/

opening the httpd log

[Thu Jul 31 17:32:23 2003] [error] (13)Permission denied: exec of /home/e-smith/files/ibays/intranet/cgi-bin/myscript.pl failed
[Thu Jul 31 17:32:23 2003] [error] [client 192.168.0.151] Premature end of script headers: /home/e-smith/files/ibays/intranet/cgi-bin/myscsript.pl

changing the permission to

chmod 777 myscript.pl

results in the message

[Thu Jul 31 17:48:31 2003] [error] [client 192.168.0.151] Premature end of script headers: /home/e-smith/files/ibays/intranet/cgi-bin/myscript.pl

running the script from the command line and pipeing it into a file

ie

./myscript.pl > myscript.html

and then opening myscript.html in a browser works as expected.

The CGI script itself seems to be sound thus this seems to be an issue with my e-smith server

note, before I changed the file permissions using chmod 777, running it from the commandline and piping into a file still resulted in valid html that could be run from a browser.