httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce H" <bh...@speakeasy.net>
Subject [users@httpd] Question on Perl path in CGI scripts
Date Fri, 09 Apr 2004 21:40:19 GMT
I have a website that I'm working on that is hosted on a Linux server that is
running apache as the web server.  The website is heavily cgi based using perl
for most of everything.

I run a development copy of that website on my local Windows 2000 box.  Up until
now, I used Xitami as the web server and everything was fine.

I decided to try Apache 2.x on my Windows machine as the webserver.  I'm running
into a problem with the perl path and I'm wondering if anyone here knows of a
fairly simple solution that might help me get around it.

The problem is that Xitami, when running perl scripts, didn't care about the
first line of the script on Windows, so it always just ran Perl where ever it
was.  However, Apache is much more picky about this and will not run the scripts
that have "#!/usr/bin/perl" at the top due to the path being different on my
windows box.  I don't want to modify this line in the scripts depending on the
location since that would be very time consuming and prone to errors.  I
typically just use the local copy for testing fixes and enhancements before
uploading them to the production site.  I've tried creating a folder structure
on all my local hard drives that equates to \usr\bin and put a perl.bat file in
there that would launch perl from the proper location, but that doesn't work.
For the time being, I've changed some of the scripts to just have
"#!perl"
 at the top to get around this.  On the Linux server, I had to create a link in
my cgi-bin folder called "perl" that points to the real perl, but I'm
uncomfortable with that solution.

Does anyone have any idea what might be a decent workaround for this?  Would
mod_perl do anything for me?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message