Solved

cgi script issue

Posted on 2013-06-14
12
723 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

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…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

735 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