Pranav Posted April 5, 2006 Report Share Posted April 5, 2006 Hi have bought a new domain in windows 2003 server. I have created a database in MSSQL andi am trying to access its content by click on a simple submit button in a HTML page<html><head><title>Secure Page</title></head><body><form action="cgi-bin\show.pl" method="post"><br><h3>Click here to view the registered users</h3><input type=submit></form></body></html>here is the perl code which accesses the MSSQL database.use DBI;use strict;my $dbh=DBI->connect("DBI:MSSQL:database","username","password") or die "Cannot connect...\n".DBI->errstr();#Fetch from Database...my $sth=$dbh->prepare("select * from table") or die "Cannot prepare...\n".$dbh->errstr();$sth->execute();print "Content-type: text/html","\n\n";print "<html>","\n";print "<head><title>Secure page</title></head>","\n";print "<body>","\n";print "<table border=1 ><tr><th>Name</th><th>Year</th><th>Course</th><th>College</th><th>Address</th><th>Event</th><th>Phone</th><th>Email</th><th>Accom</th><th>Phone</th><th>Email</th><th>Date</th></tr>\n";my($name,$year,$course,$college,$address,$event,$phone,$email,$accom,$dat);while(($name,$year,$course,$college,$address,$event,$phone,$email,$accom,$dat)=$sth->fetchrow()){#enter I have put only so that this code fits in this windowprint "<tr><th>$name</th><th>$year</th><th>$course</th><th>$college</th><th>$address</th><th>$event</th><th>$phone</th><th>$email</th><th>$accom</th><th>$dat</th><th>$phone</th><th>$email</th></tr>\n\n";}print "</table></body></html>\n";$sth->finish();$dbh->disconnect();When i run the code on my system(in mysql), i don't get any error. However when i run the samecode on my domain having, i get the following error message on my browser.CGI ErrorThe specified CGI application misbehaved by not returning a complete set of HTTP headers.I have already tried assiging execute & read permission to the file but the problem stillpersists. Please tell me what is wrong? Quote Link to comment Share on other sites More sharing options...
scuzzman Posted April 6, 2006 Report Share Posted April 6, 2006 Does this help? http://faq.openhosting.co.uk/index.asp?mai...D=23&itemID=102 Quote Link to comment Share on other sites More sharing options...
Pranav Posted April 6, 2006 Author Report Share Posted April 6, 2006 Does this help? http://faq.openhosting.co.uk/index.asp?mai...D=23&itemID=102hey thanx for the link. i have already searched a lot on the net and have found many such solutions, but none that fix my problem. tell me if can find anymore...Pranav Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.