Solved

cgi script issue

Posted on 2013-06-14
12
719 Views
Last Modified: 2013-12-25
I've installed perl on WampServer, and I'm trying to load a page on my virtual server.  I get the error in the screenshot.  However, the file which is "not found" is present in the cgi-bin folder. file not found
The html page which is attempting to execute the cgi file is in a folder which also contains the cgi-bin folder.  In the file, httpd.conf, there are several references to the path to my html files, and to the cgi-bin folder.  I have written these paths like V:/Web Files/cgi-bin... etc.   Perhaps I need instruction on the syntax for writing to this file?
0
Comment
Question by:ddantes
  • 6
  • 6
12 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39249619
Did you read the entire page that I linked for you?  That was specifically for WAMP.  http://chromicdesign.com/2009/05/setting-up-perl-for-wampp.html
0
 

Author Comment

by:ddantes
ID: 39249626
Yes, I followed those steps, except for configuring a MySQL database.   Files with .pl extension now have an icon.   This seems to be a path-to-cgi-bin issue.  I've moved that cgi-bin folder around several times, and changed the ScriptAlias path in httpd.conf several times.  Either the script "can't be found on this server" or there is an internal server error.  If the latter is the case, the Apache error log says "the system couldn't find the path specified."
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39249640
The ScriptAlias must match the <Directory "cgi-bin" and the 'LoadModule cgi...' must be uncommented / enabled.  And Apache must be restarted whenever you make any change to 'httpd.conf'.
0
 

Author Comment

by:ddantes
ID: 39249651
Would you mind looking at these?  I must be overlooking something, but I don't know what.
I have been restarting WampServer whenever I change the conf file.

It seems that the error log is referring to a path for the cgi-bin directory which I tried earlier,  but since then I changed the path in the conf file and restarted Apache.



booking-data.html
Apache-error-log.txt[
embed=file 660260]
httpd.txt.txt
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 39249678
In httpd.conf...

<Directory "C:/Program Files/Web Publish/Maui Site 1>  no end quote, syntax error.  In addition, if you are going to be hosted on Linux, you should remove all of those spaces.  I would do it anyway to avoid certain kinds of syntax problems.

<Directory "C:/Program Files/Web Publish/Maui Site 1/cgi-bin"> should be <Directory "cgi-bin">

Why isn't your web root Directory in C:/wamp/www ?
0
 

Author Comment

by:ddantes
ID: 39249686
Thank you.  So, in httpd.conf, I corrected the syntax error.  I didn't eliminate white space (yet) because the virtual server finds my web files without any difficulty, using that pathway with the spaces.  I changed the ScriptAlias directory to "cgi-bin".   I still get "file not found" when I try to execute the script.

I changed the default path to my web root directory because my web files are on a drive separate from the system drive, at least on my server.  On this laptop, I use a copy of those files, on the system drive, because WampServer apparently can't connect to a networked drive.

I'm still confused about the syntax for ScriptAlias.  Now I'm trying:
<Directory ScriptAlias C:/Program Files/web Publish/Maui Site 1/cgi-bin/ "cgi-bin"/>
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39249696
Apache will refuse to connect to a non-local drive because it does not have permission to do so.
0
 

Author Comment

by:ddantes
ID: 39249703
It's working now.  Thanks for your patience.
0
 

Author Comment

by:ddantes
ID: 39249789
One last question, if I may?  It looks like I must have a copy of all the cgi scripts in the apache subfolder of WampServer, or I get an internal server error.  Is that normal?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39250256
Are you talking about your web root, "C:\wamp\www"?  That's where Apache has permission to run.
0
 

Author Comment

by:ddantes
ID: 39250330
Thank you.  It's good to have this running.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39250562
You're welcome, glad to help.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Powershell Find Folders 7 52
quoting a comma separated list 20 82
How to Skip in FOR command if a Directory does not exist. 6 69
Register AutoHotkey 12 58
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now