DeveloperSide.NET Forums
July 07, 2020, 05:03:01 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: 'Forbidden' message running cgi-bin scripts  (Read 16393 times)
0 Members and 1 Guest are viewing this topic.
lawrence
Customer, Basic Support
Member
*****
Posts: 11


View Profile
« on: September 03, 2007, 06:58:58 PM »

Hi,
I installed two different file tranfer scripts. Both give me the same error when ran:
'Forbidden
you don't have permission to access /'appdir'/cgi-bin/progress.cgi on this server'
I get this message after I followed your instructions and introduced the following lines into the www\Apache22\conf\httpd.conf file:

AddHandler cgi-script .cgi .pl
<Directory />
    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Deny from all
</Directory>

My understanding is that this change allows Apache to run cgi-bin scripts outside the cgi installation folder: www\cgi-bin\
Those two scripts created their own cgi-bin directories in their respective installation folders within the webroot. I changed the first line of all the files in the newly created cgi-bin directories to *!C:/www/perl/bin/perl.exe from the original *!/usr/perl/bin/perl (the initial symbol is not '*' but I couldn't get it here)
Just to mention that, before this change I was getting the text in the /'appdir'/cgi-bin/upload.cgi file dysplayed on the screen.Now I get  the forbidden message.
My system is windows 2000 server. I set the permissions to allow all in the cgi-bin  folders.

Please help.

Thank you

Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: September 03, 2007, 08:42:15 PM »

Change / to /'appdir'/cgi-bin/
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
lawrence
Customer, Basic Support
Member
*****
Posts: 11


View Profile
« Reply #2 on: September 04, 2007, 09:47:53 PM »

If I understood correctly I should replace <Directory /> with <Directory /easy/cgi-bin> in the httpd.conf file.
I tried with and without the trailing slash ie <Directory /easy/cgi-bin/> or <Directory /easy/cgi-bin>. Also tried with and without the full path ie:
<Directory D:/www/webroot/easy/cgi-bin/> or <Directory /easy/cgi-bin/> It still doesn't work.
I get the same: \Forbidden message 'You don't have permission to access /easy//cgi-bin/progress.cgi on this server'. It drives me nuts. By the way, is it  normal to have the two forward slashes (easy//cgi.bi...)  in the error message?

Thanks



Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: September 04, 2007, 09:56:25 PM »

I just noticed this...

Order allow,deny
Deny from all

That second line should be 'Allow from all'. But you still need to have the full path to the cgi dir.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Intermecman
Member
*
Posts: 1


View Profile
« Reply #4 on: September 30, 2007, 11:34:19 PM »

Did you ever get this working? Were you using the v1.95 Windows Web-Development Server Suite platform? I have looked through many of the forum postings and tried so many different settings and configurations that I am totally at a loss and frustrated. I must be missing that one key element that is killing me. I want to specifically run a formmail.pl script but also receive foridden messages or it loads the script as a text file instead of executing it. It appears Apache 2.2 has changed many of the load structure of the httpd.conf file and the on-line web documentation isn't the best. Is their any secret 5 minute install on how to get this to work from a new fresh install? Thanks in Advance!
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: October 01, 2007, 12:24:41 AM »

Did you change the 'shebang' line of the script?

The 1st line should point to the interpreter.

In this case it should be...
Code:
#!/www/perl/bin/perl.exe

Place the file under \www\cgi-bin, and unless the configuration files are messed up, it should run from localhost\cgi-bin\your-file.pl
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!