iwanthome has asked for the wisdom of the Perl Monks concerning the following question:
After download Config::General module from CPAN, I decided to install it to my own directory(just copy Config::General.pm to the directory,I didn't do normal install procedure)
I write a simple test script. It can execute in unix shell.But it can't work when access it by http.Apache will report
Can't locate Config/General.pm in @INC (@INC contains: ../lib /usr/loc +al/lib/per l5/5.8.2/sun4-solaris /usr/local/lib/perl5/5.8.2 /usr/local/lib/perl5/ +site_perl/ 5.8.2/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib +/perl5/sit e_perl .) at /data/zht/perl/cgi-bin/config line 3. BEGIN failed--compilation aborted at /data/zht/perl/cgi-bin/config lin +e 3. [Fri Apr 16 09:31:06 2004] [error] [client 99.1.64.71] Premature end o +f script h eaders: /data/zht/perl/cgi-bin/config
But why it can find the pm when execute at unix shell ?
So are there any special when script execute at cgi envionment? thanks!
thanks!$ pwd /data/zht/perl/cgi-bin $ config Content-type: text/html ok$ more config #!/usr/bin/perl use lib '../lib'; use Config::General; print "Content-type: text/html\n\n"; print "ok"; $ $ ls ../lib Cisco Config Sharefunc.pm $ ls ../lib/Config General General.pm
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange problem when I install CPAN module to my own directory
by chromatic (Archbishop) on Apr 16, 2004 at 03:17 UTC | |
by iwanthome (Beadle) on Apr 16, 2004 at 06:10 UTC | |
by PodMaster (Abbot) on Apr 16, 2004 at 07:42 UTC | |
by iwanthome (Beadle) on Apr 16, 2004 at 08:11 UTC | |
|
Re: Strange problem when I install CPAN module to my own directory
by iwanthome (Beadle) on Apr 16, 2004 at 08:17 UTC |