If somebody could help me on this it would be appreciated. I have a perl page on my Apache server that is supposed to connect to a database and get information, blah blah blah.

All the permissions are correct and all the .pl pages work perfectly except when I try to connect to a database using the following:

my $dsn = "DBI:mysql:icollect:localhost";
my $dbh = DBI->connect($dsn, "", "",
{RaiseError=>0,
AutoCommit=>0})
|| die "Database connection not made: $DBI::errstr";

If I have this, I get a 500 Internal Server Error, but if I comment out this part and don't do anything DB related, the page works fine.

I have the following modules included:

use CGI qw/:standard/;
use DBD::mysql;
use DBI;


and I even tried including

use Apache;
use Apache:BI;

But if I run this from a command prompt, it works fine.

Any suggestions please. I'm new to this using Linux, the only database driven websites I've down have been using IIS :-)