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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.