Hello,i know you have been hearing from me a lot in the last 2 days. I was wondering why i can execute a script with perl but that same script gives me the Error 500 Misconfig error? Why is this? If i execute a simple script like :
#!/usr/bin/perl
use DBI;
$dbh = DBI->connect('dbi:mysql:time','pass','pass')
or die "Connection Error: $DBI::errstr\n";
$sql = "select * from times WHERE hash = 249682";
$sth = $dbh->prepare($sql);
$sth->execute
or die "SQL Error: $DBI::errstr\n";
$rv = $sth->rows;
print $rv;
This returns 1 when i run thru perl script.cgi but when i access it from my site,it gives that error,why is this?[/syntax]
[Mon Nov 27 20:46:53 2006] [error] [client 10.10.10.30] Premature end of script headers: test.cgi
[Mon Nov 27 21:26:20 2006] [error] [client 10.10.10.30] Premature end of script headers: test.cgi, referer: https://10.10.10.5/
[client 10.10.10.30] script '/var/www/logout.php' not found or unable to stat
[client 10.10.10.30] script '/var/www/logout.php' not found or unable to stat
[client 10.10.10.30] script '/var/www/logout.php' not found or unable to stat
[Mon Nov 27 22:50:39 2006] [error] [client 10.10.10.30] Premature end of script headers: test.cgi
#!/usr/bin/perl
use DBI;
print "Content-type: text/html\r\n\r\n";
print "Now it works.";
But if you consult a manual i'm pretty sure that throughout the years people have written libraries to do that for you...
(The CGI documentation seems like a good place to start)