httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Elmer <Stephen.El...@ccotrust.nhs.uk>
Subject RE: [users@httpd] cgi scripts not running
Date Fri, 29 Jul 2005 23:35:52 GMT
If I have <FORM METHOD=POST ACTION=”cgi-bin/mycgi.cgi”>     the error is
The file /var/www/html/cgi-bin/mycgi.cgi cannot be found

 

If I have <FORM METHOD=POST ACTION=”mycgi.cgi”>     the error is    The file
/var/www/html/mycgi.cgi cannot be found

 

If I have <FORM METHOD=POST ACTION=”/cgi-bin/mycgi.cgi”>  the error is  The
file /cgi-bin/mycgi.cgi cannot be found

 

So how do I get it to look in /var/www/cgi-bin    

 

I’ve put  ScriptAlias /cgi-bin/  “/var/www/cgi-bin/”  in the config file,
dosen’t this do it?

 

 

Thanks

 

Stephen

 

 

 

 

   _____  

From: Kevin O'Neil [mailto:kevinslair@verizon.net] 
Sent: 30 July 2005 00:18
To: users@httpd.apache.org
Subject: Re: [users@httpd] cgi scripts not running

 

Stephen,

I think the answer may be that you have: <FORM METHOD=POST
ACTION=”cgi-bin/mycgi.cgi”>

When called from the page that has the form on it... it is looking for the
mycgi.cgi file in: /var/www/html/cgi-bin

Please correct me if I'm wrong.

Thanks,

Kevin

 

Hello Mark.

 

Tried replacing 

 

 <Directory “/var/www/cgi-bin/”>

with

<Directory “/var/www/cgi-bin”>

 

 

Looking thro the Apache docs it should be 

<Directory “/var/www/cgi-bin”>

 

 And 

 

The +ExecCGI as far as I can tell is not needed as there is only one option
within <Directory “/var/www/cgi-bin”> so it’s the most specific one. But I
did try it anyway!

 

 

 

I’ve been trying various things ;

 

I can HYPERLINK
"http://localhost/cgi-bin/mycgi.cgi"http://localhost/cgi-bin/mycgi.cgi and
see the script run correctly

 

However, viewing the html file that invokes the script named by ACTION gives
the error message The file /cgi-bin/mycgi.cgi cannot be found

 

The complete line is <FORM METHOD=POST ACTION=”cgi-bin/mycgi.cgi”>

 

I’ve tried putting a / infront of the cgi-bin/mycgi.cgi        by the way 

 

 

Document_root=/var/www/html

 

Cgi-bin =/var/www/cgi-bin

 

Shebang line is ok, the script works from command line

 

 

 

 

 Thanks for you help, I’ll happily try any other suggestions

 

 

Stephen


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.7/60 - Release Date: 28/07/2005



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.7/60 - Release Date: 28/07/2005
 

Mime
View raw message