in reply to Module Compilation Problem (cmd prompt vs. web)

Perhaps some points for clarification: As an aside, it probably is a bad idea to have a perl binary beneath the cgi-bin directory, if that is the case; if it's not protected through proper permissions from the outside world, it's not inconceivable that someone might come along and try exploring things like http://your.server/cgi-bin/usr/local/bin/perl, and if they find it ...
  • Comment on Re: Module Compilation Problem (cmd prompt vs. web)

Replies are listed 'Best First'.
Re^2: Module Compilation Problem (cmd prompt vs. web)
by mike hal (Initiate) on Sep 27, 2005 at 14:47 UTC
    Thank you for your detailed questions. I want to apologize in advance if my responses are not on-point. I’m a neophyte still trying to figure out my way around. I have addressed your questions on a point-by-point basis.
    • The script runs runs OK without the use of the HTTP::Request module. HTTP::Request is locally installed within the account home directory specified by the/full/dir/path/8080/cgi-bin/usr/local path. The CGI.pm module is located here: /usr/lib/perl5/5.8.0

      FWIW, here is the @INC value as printed from the script: …

      /the/full/dir/path/8080/cgi-bin/usr/local<br> /the/full/dir/path/8080/cgi-bin/usr/local/lib/perl5<br> /the/full/dir/path/8080/cgi-bin/usr/local/bin<br> /the/full/dir/path/8080/cgi-bin/usr/local/lib/perl5/site_perl<br> /the/full/dir/path/8080/cgi-bin/usr/local/lib/perl5/man<br> /the/full/dir/path/8080/cgi-bin/usr/local/lib/perl5/man/man3<br> /usr/lib/perl5/5.8.0/i386-linux-thread-multi<br> /usr/lib/perl5/5.8.0<br> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi<br> /usr/lib/perl5/site_perl/5.8.0<br> /usr/lib/perl5/site_perl<br> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi<br> /usr/lib/perl5/vendor_perl/5.8.0<br> /usr/lib/perl5/vendor_perl<br>
    • This is an iplanet web server running Linux. I agree with your concern about the case sensitivity issue. However, if I module remove references to other modules within HTTP::Request, the module does not throw an error when run from the web server.
    • The symbolic link: /full/dir/path/8080/ownercenter/gmocus/test.cgi Points to: /full/dir/path/8080/cgi-bin/validator/test.cgi Secondly, the module contents, not the script contents, displayed in the browser
    • No, the path the/full/dir/path/8080/cgi-bin/usr/local only points to those local modules required by the script to perform a specific function.
    • I agree. Once I resolve the current issue, I’ll need to address the various security vulnerabilities.
      Based on your @INC, one thing that may be worth checking is the following. HTTP::Request requires HTTP::Message, which in turn potentially requires a number of other modules (one can use scandeps.pl to see which ones). The pure Perl modules such as HTTP::Headers are presumably available under /the/full/dir/path/8080/cgi-bin/usr/local/lib/perl5/site_perl, if not under the system /usr/lib/perl5/ tree, but there's some XS-based modules, such as MIME::Base64 or Compress::Zlib, that may also be needed. Such modules normally get installed into an architecture-specific subdirectory, such as i386-linux-thread-multi. The lib module will add such architecture-specific directories to @INC for you, but they don't seem to be present in your /the/full/dir/path/8080/cgi-bin/usr/local/lib/perl5/site_perl tree. If modules such as MIME::Base64 and Compress::Zlib are not available under the system /usr/lib/perl5/ tree, are they present in your /the/full/dir/path/8080/cgi-bin/usr/local/lib/perl5/site_perl tree? If so, are they in such an architecture-specific directory? If they are available, but in a non-standard location, you may have to add such directories to your use lib statement.