Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a Perl web page (on Windows 2000 server) that was working until we put it on another Server. Now when I try and bring up the page it gives me the Windows "Save As". Basically it wants me to save the file. Why is this happening? The permissions says full control on it. Is there something I should check like where Perl was installed on this server? I know Perl is on the server but does it need to have some settings changed to acknowledge Perl/CGI on the web pages???

Replies are listed 'Best First'.
Re: Perl not working on my web page
by PodMaster (Abbot) on Aug 05, 2003 at 12:13 UTC
Re: Perl not working on my web page
by bobn (Chaplain) on Aug 05, 2003 at 13:01 UTC

    It's sending the page instead of running it, so, if permissions are correct, it's a websever configurations issue.

    --Bob Niederman, http://bob-n.com
Re: Perl not working on my web page
by katgirl (Hermit) on Aug 05, 2003 at 13:08 UTC
    What is the file extension of your perl script? If it is .pl try changing it to .cgi - a different server may not recognise the .pl extension as an executable file.
      good point katgirl. If you are working w/ more than one language, it might help to name them .pl.cgi so that you know the cgi script was written in perl. if windows will let you do that.
        I tried .cgi and .pl and get same windows popup asking me if I want to save the file. So I assume it is a IIS configuration issue on the server??
Re: Perl not working on my web page
by JamesNC (Chaplain) on Aug 05, 2003 at 13:44 UTC
    Yes, you need to configure the web-server to handle each file type. Perl scripts must pass through the Perl interpeter. The steps are specific to the web-server you are running but it simply involes associating the .cgi or .pl/.plx file extension with the path to perl .exe/.dll along with a scripts directory and user permissions. Apache is configured by editing its httpd.conf file. IIS is done with it's admin tool. Piece O' Cake for the web-server guy, he just over-looked it probably :)
    I would guess you might have other problems even after this is done if your script connects to a database or does other actions specific to certain other modules being used in the script. Unless you are the author and are sure all of the necessary modules are loaded on that server and the links are changed in the script to point to the necessary paths, be prepared for some looking at perl script :-) Hope the gent used "strict" ;-).
      Okay, thanks for all the info!