http://qs321.pair.com?node_id=635833


in reply to Re: mod_perl : Couldnt load Apache.pm
in thread mod_perl : Couldnt load Apache.pm

Thanks for your time. Now my startup.pl looks like

#!/usr/bin/perl BEGIN { use Apache::DBI; } $dbh = Apache::DBI->connect_on_init("DBI:mysql:database=dbname;host=lo +calhost","dbuser","dbpass",{ PrintError => 1, RaiseError => 0, AutoCo +mmit => 1}); 1;
Still have same error - "Apache.pm was not loaded". I have installed mod_perl from apache.org today and Apache::DBI from CPAN. So I thing both are latest packages.

Replies are listed 'Best First'.
Re^3: mod_perl : Couldnt load Apache.pm
by chargrill (Parson) on Aug 29, 2007 at 16:53 UTC

    At the top of my startup.pl file, I have:

    BEGIN { use Apache(); # ... }

    Seems I was steering you wrong, thinking you hadn't installed mod_perl yet.


    --chargrill
    s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
      You don't need to load Apache. mod_perl does it already.