modifying scripts for mod_perl?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top