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

Hello,

I've got an problem loading cgi files on my webserver (apache+perl module) the error says that he can't locate
WebDB.pm in the @INC directory's. WebDB.pm is located in /usr/lib/apache2/webdb, here's the actual error:

Sat May 30 00:33:50 2009 error client xx.xxx.xxx.xxx Can't locate WebDB.pm
in @INC (@INC contains: /usr/lib/apache2/webdb /etc/perl /usr/local/lib/perl
Sat May 30 00:33:50 2009 error client xx.xxx.xxx.xxx BEGIN failed--compilation
aborted at /var/www/index.cgi line 6.
Sat May 30 00:33:50 2009 error client xx.xxx.xxx.xxx Premature end of script headers: index.cgi


The strange thing is that everything worked in the past with Ubuntu 8.04 and Perl 5.8 and
now I've upgraded the server to Ubuntu 9.04 and Perl 5.10. And now I got the message
from above, and nothing changed to the scripts or to something else that's the strangest thing.
I don't think I am the only one who got this problem so if anyone has figured it out or if
someone know what to do please help me cause I can't go further with my scripts and I hate that hahaha.
Thanks in advance,

Greetz,
Pr0t0n


Edit: Made a typo in the error message the blank space is gone.

Replies are listed 'Best First'.
Re: Problem loading CGI files
by ikegami (Patriarch) on Jun 02, 2009 at 20:10 UTC
    @INC contains: /usr/lib/apache2 /webdb ^ |
    Do you realize there's a space there?
Re: Problem loading CGI files
by almut (Canon) on Jun 02, 2009 at 21:27 UTC

    What do you get when you run

    sudo -u www-data ls -l /usr/lib/apache2/webdb/WebDB.pm
      I get this error while I am in root:
      root@Black-Cell:/usr/lib/apache2# sudo -u www-data ls -l /usr/lib/apac +he2/webdb/WebDB.pm ls: cannot access /usr/lib/apache2/webdb/WebDB.pm: Permission denied


      After I got this error I checked the rights of the script and that's set to 0755.
        I checked the rights of the script and that's set to 0755

        Check the permissions of the directories, too...