Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

cgi script issue

Posted on 2013-06-14
12
Medium Priority
?
727 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 84

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 84

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
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 

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 84

Accepted Solution

by:
Dave Baldwin earned 1000 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 84

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 84

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 84

Expert Comment

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

Featured Post

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
This article will show, step by step, how to integrate R code into a R Sweave document
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.

670 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