Van Andel, Robbert wrote:
> A coworker and I have been working on connecting to a MySQL database
> running on the webserver.  We are using the following command to
> connect: 
> 
> my $dsn = 'DBI:$driver:database=$database;host=$hostname';

  my $dsn = "DBI:$driver:database=$database;host=$hostname';

> my $dbh = DBI=>connect("$dsn", "$user", "$password") or die errstr

  my $dbh = DBI->connect($dsn, $user, $password) or die $DBI::errstr;

> 
> This works when run from an ordinary shell based perl program but when
> we try to put it on the website into the cgi-bin it will not connect.
> What are we doing wrong? 

Does MySQL need one or more environment variables set? If it connects via a
UNIX domain socket, is that socket writeable by the web server user? These
are just guesses; the $DBI::errstr should give you more info on the specific
problem.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to