Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Custom module is present but not read by Apache (?)

by Anonymous Monk
on Dec 10, 2019 at 12:43 UTC ( [id://11109913]=note: print w/replies, xml ) Need Help??


in reply to Re: Custom module is present but not read by Apache (?)
in thread Custom module is present but not read by Apache (?)

Yes, that stroke me also as weird. But, given that I "only" need to migrate this website, and I just took its files from the other location, wouldn't this be problematic for the current installation too? It seems to work without a problem there.. I am wondering if there is some setting that I have not done appropriately, my vhost conf file looks like this:
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname a +nd port that # the server uses to identify itself. This is used when creati +ng # redirection URLs. In the context of virtual hosts, the Serve +rName # specifies what hostname must appear in the request's Host: h +eader to # match this virtual host. For the default virtual host (this +file) this # value is not decisive as it is used as a last resort host re +gardless. # However, you must set it for any further virtual host explic +itly. #ServerName www.example.com ServerAdmin webmaster@example.com ServerName xxx.xxx.xx.xx DocumentRoot /srv/www/Direct/htdocs/ # Available loglevels: trace8, ..., trace1, debug, info, notic +e, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn #ErrorLog ${APACHE_LOG_DIR}/error.log #CustomLog ${APACHE_LOG_DIR}/access.log combined ErrorLog /srv/www/Direct/error_directwebdemo.log ScriptAlias "/cgi-bin/" "/srv/www/Direct/cgi-bin/" <Directory "/srv/www/Direct/cgi-bin"> AllowOverride None Options +ExecCGI -Includes Order allow,deny Allow from all </Directory> # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For exa +mple the # following line enables the CGI configuration for this host o +nly # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
For Centos with Apache 2.4.

Replies are listed 'Best First'.
Re^3: Custom module is present but not read by Apache (?)
by Corion (Patriarch) on Dec 10, 2019 at 12:48 UTC

    Since a CGI script is merely a normal program that has some expectations on its input and output, you can simply run the program and look if (and what) errors get printed.

    If the program works on the old machine, look at the contents of @INC on the old machine. Somewhere there is Error.pm, while it is not available on the new machine.

      Thanks a lot for your time @Corion. The contents look kind of similar to me: OLD
      /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi /usr/lib/perl5/5.12.3/ /usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.12.3 /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi /usr/lib/perl5/5.12.3
      NEW
      /root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi /root/perl5/lib/perl5/5.16.3 /root/perl5/lib/perl5/x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5

        But on the old machine, there is one of these files:

        /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/Error.pm /usr/lib/perl5/5.12.3/Error.pm /usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi/Error.pm /usr/lib/perl5/vendor_perl/5.12.3/Error.pm /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/Error.pm /usr/lib/perl5/5.12.3/Error.pm

        And on the new machine, no such file exists:

        /root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi/Error.pm /root/perl5/lib/perl5/5.16.3/Error.pm /root/perl5/lib/perl5/x86_64-linux-thread-multi/Error.pm /root/perl5/lib/perl5/Error.pm /usr/local/lib64/perl5/Error.pm /usr/local/share/perl5/Error.pm /usr/lib64/perl5/vendor_perl/Error.pm /usr/share/perl5/vendor_perl/Error.pm /usr/lib64/perl5/Error.pm /usr/share/perl5/Error.pm

        Most likely, as I and tobyink already pointed out, Errror.pm is installed on the old machine, but is not on the new machine. Either talk to your system administrator, or the developer of the program about the prerequisites. Also consider maybe installing Error.pm via the package manager on the new machine, or instructing your system administrator to do so.

        You can check on the old machine if Error is installed by using:

        perl -MError -e 'print "Error.pm is installed"'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11109913]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-25 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found