Bourgeois_Rage has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I know that there is probably a FAQ on this in the library or something, but I can't seem to find it. I have installed ActivePerl on my WinNT machine at home. I've never installed perl before on any machine. All I have ever done is program on pre-configed machines. When I run .pl files, the program runs fine. Meaning, I have installed ActivePerl correctly. When I try to run .cgi files through a browser, it doesn't work at all. The browser doesn't even recognize it as a CGI file. What am I doing wrong here? Please point me to an easy to follow FAQ, or post your answers. Thanks, Rage
Re: Installing CGI
by wonko (Pilgrim) on Jun 17, 2000 at 19:14 UTC
|
You need a web server to run the scripts. I use Xitami to run scripts during developement, it is free and simple. You can find more stuff at winfiles
When you have installed the webserver, place the files in the cgi-bin folder or whatever folder the documentation says. Run the server (If it is not already running) and call the scripts with http://Your-computer-name/cgi-bin/your-script-name.pl
With Xitami you don't need any configuration, it has a browser-based admin tool and I think it is good for developement purposes, but I woudn't trust it as a production server. (You might have to change the .pl file endings to .cgi though)
good luck! : )
/wonko | [reply] |
RE: Installing CGI
by Ovid (Cardinal) on Jun 18, 2000 at 10:10 UTC
|
To get your CGI scripts up and running and passing data to and from your browser, you need to set up a Web server. I haven't used the Xitami server mentioned above, but I've found Apache for Windows to be fairly reliable and can be installed as a service. Though it is officially in beta, I've only had one problem with it. I thought it was a bug, but it turns out that it was me (like usual).
Ordinarily, I wouldn't suggest beta software, but I see from your home node that you are a computer engineering student. Since it is estimated that half or more of the Web servers in existence are Apache, I think it would be good for you to learn it (assuming that you intend to seek work in your degree field :)
Cheers,
Curtis | [reply] |
Re: Installing CGI
by ase (Monk) on Jun 18, 2000 at 00:31 UTC
|
You asked for Links to FAQ's. Don't know how easy to follow they are but here you go
Hope that helps, FWIW I use Xitami too. It works great and very simple to set up.
| [reply] |
RE: Installing CGI
by BigJoe (Curate) on Jun 17, 2000 at 19:19 UTC
|
To make your browser see it you need to make sure you have either IIS 3.0 or 4.0 installed and running on the machine. I have not had good luck with the latest build of active perl on the NT machine. I ended up installing build 522. On IIS 3.0 I installed 522 and then had to copy the perl.exe off of a NT resource disk. In the documentation that is copied to you machine when you install, there is a document on setting the perl.exe as a service of the web server which then allows the web server run them.
If you did that and are getting this <file> is not supported then try to make associations with the .pl extension in the web server and windows(build 522 does this for you).
If you get a 501 server error either the Iuser does't have permissions for the Perl.exe service or they don't have execute access on the script.
To make it recognize a .cgi you need to associate the .cgi as a perl file in the web browser and windows machine itself. The documentation on the activeperl will tell you how to make the registry changes.
--BigJoe
| [reply] |
|