|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hi,
I'm a php/mysql programmer trying to set this server up to run some perl scripts. I'm able to run them from the command prompt, but when i run them through a browser I get a "500 Internal Server Error : The server encountered an internal error or misconfiguration and was unable to complete your request." In my error log it says: "[error] (2)No such file or directory: exec of /opt/httpd/cgi-bin/test.cgi failed" This is strange b/c the directory exists. I have permissions set to 755 for both the cgi-bin dir and test.cgi So...I'm assuming this is an apache configuration problem. Here's what my httpd.conf looks like (note i have several domains that i want to be able to access these scripts): <VirtualHost 204.111.11.11> ServerAdmin webmaster@domain.com DocumentRoot /opt/httpd/html ServerName www.domain.com </VirtualHost> ScriptAlias /cgi-bin/ /opt/httpd/cgi-bin/ <Directory /opt/httpd/cgi-bin> Options ExecCGI AllowOverride None </Directory> Can anyone see what I'm doing wrong? TIA, Mike |
|
#2
|
|||
|
|||
|
Start here -> http://forums.devshed.com/showthrea...2155&forumid=15
Then here -> http://forums.devshed.com/showthrea...21944&forumid=6 In addition, your cgi-bin is ScriptAlias'ed, so you CAN'T set Options ExecCGI, set it to Options None. I don't care if that's the default setting for Redhat, just do what I tell you to do. RedHat teams are computer illiterate anyway. Last edited by freebsd : October 17th, 2001 at 12:03 AM. |
|
#3
|
|||
|
|||
|
freebsd,
got it! thanks for your help! the problem was with the ^m your other post did the trick: "Again, two possible causes. The ^M is not human-visible unless you run vi /home/mydomain/cgi-bin/test.cgi. That said, you can't see it if you do cat /home/mydomain/cgi-bin/test.cgi. Anyhow, you can try here and run your test.cgi thru it." i ran this on my script and it fixed it: perl -i -pne 's/\r\n/\n/g' somescript.pl i scp'ed my script, so looks like i need to find a way to scp in ascii. i'm using winscp and it doesn't have that option. anyone know of an alternative? thanks again for your help. it's nice to have experienced people answering posts. mike |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Setting up CGI/Perl on red hat 6.1 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|