i've been trying to connect to a db using this code:
but it does not work, i dont get the die error message only this default xampp error :
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Code:
#!"C:\xampp\perl\strawberry\perl\bin\perl.exe"
use DBI;
use strict;
use warnings;
print "Content-type: text/html \n\n"; #HTTP HEADER
my $dbh = DBI->connect("DBI:mysql:survey","root","") or die "Couldn't connect to database: " . DBI->errstr;
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Code:
Premature end of script headers: DB.pl If you think this is a server error, please contact the webmaster. Error 500 localhost 12/06/09 11:00:53 Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8
Comment