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

I am moving to a new Sun server running Solaris8. I installed perl 5.00503, MySQL, and Apache with no trouble. Then I started to install the required modules for the scripts I already have. I reduced the problem down to this:
#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); use HTML::Parser; print("Content-type: text/html\n\n"); print "hello.\n"; exit(0);
From the COMMAND LINE, I get hello. But from APACHE, I get,
[Wed Oct 10 12:13:00 2001] Parser.pm: [Wed Oct 10 12:13:00 2001] DynaL +oader.pm: Can't locate loadable object for module HTML::Parser in @IN +C (@INC contains: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 +/usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) + at /www/mywebsite/htdocs/test.pl line 5 BEGIN failed--compilation ab +orted at /www/mywebsite/htdocs/test.pl line 5.
The problem is with Apache not reading Parser.pm, but why??? I have NO PROBLEMS with other scripts. Just this one that needs Parser.pm

Parser.pm is version 3.25 - I tried finding an older version on CPAN with no luck

Please help!!!

Replies are listed 'Best First'.
Re: Module Installation Troubles
by runrig (Abbot) on Oct 10, 2001 at 21:45 UTC
    Try 'print "@INC"' from both the command line and from apache and see if they are different. Check to see if you have 'Parser.so' and 'Parser.bs' under an 'auto' directory in one of those INC directories above (under the site-perl/5.005/sun4-solaris directory probably, and HTML/Parser.pm in the same sun4-solaris directory). Do you have multiple installations of perl or HTML::Parser?
Re: Module Installation Troubles
by perrin (Chancellor) on Oct 10, 2001 at 22:13 UTC
    Make sure that the user you're running your web as server has permission to read the files and directories where HTML::Parser lives.
      AH!!! the auto directory looked like this:
      drwxr-xr-x 12 root root 512 Oct 9 18:05 . drwxr-xr-x 12 root root 512 Oct 9 18:03 .. drwxr-xr-x 3 root root 512 Oct 4 11:15 DBD drwxr-xr-x 2 root root 512 Sep 1 11:41 DBI drwx------ 3 root root 512 Oct 4 10:43 Data drwxr-xr-x 3 root root 512 Oct 9 17:46 Digest drwx------ 4 root root 512 Oct 9 18:03 HTML drwxr-xr-x 3 root root 512 Oct 9 17:42 MIME drwx------ 2 root root 512 Oct 4 11:15 Msql-Mysql-modul +es drwxr-xr-x 4 root root 512 Oct 9 18:10 Net drwx------ 2 root root 512 Oct 9 17:49 URI drwx------ 2 root root 512 Oct 9 18:05 libwww-perl
      -----
      child: "But, I've looked everywhere!!!"
      parent "Obviously not..."

      It is probably not worth asking why the make installer would cause that, is it?

      Thanks.

        This is an example of why you should not install as root.