Please help,
I use activestate perl with mysql on Windows XP. I have download the mysql, dbd, ODBC, and other related modules from CPAN and copied it in the perl/lib and some in lib/win32 folder. I see this error, everytime...
********************************************************* ***********************************************************
CGI Error The specified CGI application misbehaved by not returning a complete s +et of HTTP headers. The headers it did return are: Can't locate auto/Win32/ODBC/mysql.al in @INC (@INC contains: C:/Perl/ +site/lib C:/Perl/lib .)
*********************************************************** *********************************************************
My .pl file code is as follows:
************************************************************ ********************************************************
#!c:/perl/perl/bin/perl require "cgi-lib.pl"; &ReadParse; $login = $in{'login_id'}; $pw = $in{'password'}; use Win32::ODBC; if (!($Db=new Win32::ODBC("dsn=testdns;UID=root;PWD=mysql"))) { $a = Win32::ODBC::Error(); print "Content-type: text/html\n\n"; print "<html>"; print "<body>"; print "<p> $a </p>"; print "</body></html>"; exit; } if(!$Db->mysql("select * from employee_info where login_id = \'$login\ +' and password = \'$pw\'" )) { if ($Db->FetchRow()) { undef%Data; %Data = $Db->DataHash(); print "Content-type: text/html\n"; print "Set-cookie: fname = $Data{'FIRST_NAME'}\n"; print "Set-cookie: lname = $Data{'LAST_NAME'}\n"; print "Set-cookie: loginid= $Data{'LOGIN_ID'}\n"; print "Set-cookie: passwd = $Data{'PASSWORD'}\n\n"; &LoginPage; close($Db); exit; } } print "content-type: text/html\n\n"; print "<html>"; print "<BODY>"; print "<script Language = 'JavaScript'>"; print "alert('ACCESS DENIED');"; print "history.back();"; print "</script>"; print "</BODY>"; print "</HTML>"; close($Db); exit; sub LoginPage { print <<"DISPLAY"; <html> <FRAMESET COLS = "21%,*" FRAMESPACING = NO > <FRAME SRC = "menu.htm" Name = "list" FRAMEBORDER = NO bgcolor = yello +w> <FRAMESET ROWS = "10%,80%,*" FRAMESPACING = NO > <FRAME SRC = "header.pl" Name = "head" FRAMEBORDER = NO > <FRAME SRC = "display.htm" Name = "show" FRAMEBORDER = NO > <FRAME SRC = "footer.htm" Name = "footer" FRAMEBORDER = NO > </FRAMESET> </FRAMESET> </HTML> DISPLAY }
*************************************************************** *****************************************************
20070821 Janitored by Corion: Cleaned formatting, added code tags, as per Writeup Formatting Tips
In reply to CGI Error Again by raviguhani
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |