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

I am not familiar with Apache, but I am running it (version 1.3.12) on my Win98 box so I can test Perl CGI scripts locally. My scripts run okay from the command line, but whenever I try to access them through a browser, the error log says:
[Sat Sep 16 10:54:58 2000] [error] [client 127.0.0.1] Can't locate str +ict.pm in @INC at c:/program files/apache group/apache/cgi-bin/hpage. +cgi line 5.
Is there something I need to set up in the Apache config for this? Currently, I've tried: Thanks!

Replies are listed 'Best First'.
Re: Perl CGI with Apache on Win98
by cianoz (Friar) on Sep 16, 2000 at 23:25 UTC
    maybe apache redefines PATH variable before executing the cgi, you should use
    use lib 'c:\Perl\lib';
    before any other 'use' statement.

    ps:
    I don't know if this is useful in this case but i remember apache on win32 interprets the bang path on top of cgi script so you shoud also add

    #!c:\perl\bin\perl.exe
    as the very first line of your script.