SunQuest
           Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old October 16th, 2001, 11:16 PM
mikedill mikedill is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Evanston, IL 60202
Posts: 10 mikedill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Setting up CGI/Perl on red hat 6.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

Reply With Quote
  #2  
Old October 16th, 2001, 11:59 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old October 17th, 2001, 12:25 AM
mikedill mikedill is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: Evanston, IL 60202
Posts: 10 mikedill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Setting up CGI/Perl on red hat 6.1


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway