httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [users@httpd] Re: Child Spawning
Date Tue, 11 Mar 2003 03:54:28 GMT
At 02:04 PM 3/10/2003, Cody Harris wrote:
>It worked before, and perl can execute it from command just fine. Apache seems not to
like it, but it's the exact same, i didn't change it at all. That makes me think it's a perl
thang.

Apache doesn't launch scripts the same way your command
interpreter does!!!  If it did, every user who requested a .txt file
would cause a copy of Notepad to open up on your machine
(but hidden, probably.)

Wait - you can make Apache do just that;

   ScriptInterpreterSource registry

Now, you can guess that leaving text files or .doc files in your
cgi-bin directory would be very harmful.  Instead, Apache adds
your file's name at the end of the first line of your script file, which
MUST start with the two characters '#!' (pound bang, therefore it's
called the 'shebang').  So if perl is in c:\perl\bin, you probably want
the first line of your file to be

  #!c:\perl\bin\perl.exe

or you can use forward slashes like unix would.  In any case, Apache
will run that script as

  c:\perl\bin\perl.exe c:\path-to-your\script.pl

Simple, eh?




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