in reply to Perl, PHP, and Apache
Apache comes pretty much pre-configured witht he ability to run Perl scripts that are 1) In it's cgi-bin directory, and 2)have the #! on the first line pointing to where your perl executable is. This is it's standard and recommended configuration. If you have another directory you want to run scripts from, you'll need to configure Apache to use it, likewise, there's an option to have Apache (on Win32 platforms, which is what I'm assuming you're using here) use the Registry/file extention setting insead of the #! setting -- but I don't necessarly recommend it.
So, for you, all you should need to do is install the latest Win32-based version of Apache, then Perl precompiled for Win32. When you install Perl, make a note of what directory Perl is installed into, then, after the install, go into it, then go into the bin\ directory, and find the file Perl.exe. Then go into where Apache is installed, find the cgi-bin directory, then find a file printenv.pl. Open that file in a text editor, and chage the top line as described above. Forinstance, if the location of your Perl executable is c:\Perl\bin\Perl.exe, you'd put #!c:\perl\bin\perl.exe as the top line.
Run printenv.pl in your web browser like any other cgi script, and be amazed. That's the basics, and I HIGHLY recommend you check out Apache's own documetation on the subject -- it's clearly written, and will guide you well if you have patience with it. Good luck.
----Asim, known to some as Woodrow.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl, PHP, and Apache
by Kiko (Scribe) on Apr 13, 2001 at 20:22 UTC | |
by Asim (Hermit) on Apr 13, 2001 at 20:57 UTC |