Note that there are some explanatory texts on larger screens.

plurals
  1. POModPerl::RegistryPrefork should make my old cgi work but
    primarykey
    data
    text
    <p>I developped a web app under CGI.pm.I'd like to switch to mod_perl2. My webapp worked under CGI but when i tried to change the mod, it's not working anymore while I didn't change anything in the webapp ,except the apache conf files to run under mod_perl.</p> <p>I have installed mod-perl2 and configure my VirualHost like this :</p> <pre><code>Alias /project1/ /var/www/v6/cgi-bin/ PerlModule Apache::DBI PerlModule ModPerl::RegistryPrefork &lt;Directory /var/www/v6/cgi-bin/ &gt; PerlOptions -SetupEnv SetHandler perl-script PerlResponseHandler ModPerl::RegistryPrefork PerlOptions +ParseHeaders Options +ExecCGI Order allow,deny Allow from all &lt;/Directory&gt; </code></pre> <p>My script looks like . he uses some modules in /v6/cgi-bin/lib/</p> <pre><code>#!/usr/bin/perl use lib qw(lib); use strict; use DBI; use CGI; use Template; use CGI::Carp qw(fatalsToBrowser); use Data::Dumper; use Connexion; use Search; my $cgi = new CGI; our $fastdb = Connexion::database('1','1'); my $get_description__id_sth = Search-&gt;get_description_id_sth(); </code></pre> <p>Apache2 write the error in the log :</p> <blockquote> <p>[Thu Feb 3 17:35:13 2011] -e: DBI connect(':','',...) failed: Access denied for user 'www-data'@'localhost' (using password: NO) at lib/Connexion.pm line 134</p> </blockquote> <p>In the browser i have : </p> <blockquote> <p>Can't call method "prepare" on an undefined value at lib/Search.pm line 51.</p> </blockquote> <p>So i understand that the script can't connect to the database.But why? It was working on mod_cgi. If someone has an idea :'( Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload