![]() If you listened to my advice in the "Install" step, the path should be close to: C:/usr/bin/perl.exeįor the perl path C:/usr/bin/perl.exe all of these are/were valid. If you do not know where your perl.exe installed to, go to Start -> Search and type in a search for perl.exe This location is the path to perl you put on the top of all your cgi scripts. If you will be creating your own cgi-bin, you will want to comment out: ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" so it becomes #ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" cgi so 'perl' extension is also treated as cgi files. If you want to use CGI outside the C:/Apache2_2/cgi-bin/ ScriptAliased directory, you will need to uncomment the following line: #AddHandler cgi-script. Using Notepad (or other text editor) open nf (should be start-menu shortcut "Apache HTTP Server 2.2 > Configure Apache Server > Edit the Apache nf Configuration File") and search for Options Indexes FollowSymLinks (about line 190) when you find it add ExecCGI to the end so it looks like ![]() The rest should be grayed out and read-only, but if not, leave them unchecked Add Perl to the PATH environment variable This allows me to write code on my Windows machine, then move it (without making any changes) to a Linux machine and have it run there. So, when I install Perl on a Windows machine, instead of installing it in the default location (which is C:\perl for ActivePerl) I install it in C:\usr so that the Perl executable is located at /usr/bin/perl. If you will be using Perl CGI programs and want to maintain some level of portability between both Linux machines and Windows machines, you will want to install Perl to the same location on your Windows machine that it is on most Linux machines.įor example, on a standard Linux machine, Perl is located at /usr/bin/perl and so every Perl program that I write begins with #!/usr/bin/perl. In someone else's words (very good advice) I highly recommend that you install perl to a directory like: I tend to miss it every time and have to go back) change the install location (hit the little "browse" button). ![]() On the "Setup" screen (where you choose what features to install - should be about the 2nd or 3rd screen in. Otherwise use the 32-bit (x86) version (the 32-bit version will work on either type of machine). I did not test the 64-bit (圆4) version of Perl, but if you have a 64-bit Windows version, you should be fine if you want to download/install it. ActivePerl 5.10ĭownload the latest Windows Installer (MSI) version of ActivePerl from (if it asks you to register, you can just leave the form blank and hit "Continue"). The only reason to install ActivePerl is if you will be running Perl based CGI scripts. Installing Perl for CGI is completely optional and none of the other parts of this tutorial require it to be installed. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |