S
Sergei Shelukhin
I get variable error when I try to use procedure in a module to connect to
db.
=== common.pm
sub connect
{
return DBI->connect( "DBI:mysql:blogbase:localhost", "something",
"something" ) or croak "MySQL seems to be down.";
}
== index.pl
use common;
#...
$db = Common::connect() or croak "woops";
If I access it on my testbox running Apache without mod_perl, it works.
If I type perl index.pl in console on the working server, it works.
When I try to access it on the server, with Apache with mod_perl, it croaks.
What's the problem? How do I fix it? I seem to be pretty much out of any
clue...
I was also wondering if there's something like "HOWTO migrate to mod_perl"
guide somewhere.
db.
=== common.pm
sub connect
{
return DBI->connect( "DBI:mysql:blogbase:localhost", "something",
"something" ) or croak "MySQL seems to be down.";
}
== index.pl
use common;
#...
$db = Common::connect() or croak "woops";
If I access it on my testbox running Apache without mod_perl, it works.
If I type perl index.pl in console on the working server, it works.
When I try to access it on the server, with Apache with mod_perl, it croaks.
What's the problem? How do I fix it? I seem to be pretty much out of any
clue...
I was also wondering if there's something like "HOWTO migrate to mod_perl"
guide somewhere.