Solved

cgi script issue

Posted on 2013-06-14
12
724 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

752 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