kalaisuresh has asked for the wisdom of the Perl Monks concerning the following question:
hai,
in my program i used the DBI module
my program running well in terminal(redhat linux 9.0)
if i use the same program in interface (use CGI) that time it shows the log error
[Mon Nov 27 20:29:35 2006] [error] [client] BEGIN failed--compilation +aborted at /home/httpd/cgi-bin/mysql_kalai/selectPdb.pl line 9. [Mon Nov 27 20:29:43 2006] [error] [client] Premature end of script he +aders: selectPdb.pl [Mon Nov 27 20:29:50 2006] [error] [client ] Premature end of script h +eaders: selectPdb.pl [Mon Nov 27 20:29:50 2006] [error] [client ] Can't locate Exporter/Hea +vy.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread- +multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux- +thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl +/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/per +l5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/ +i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /usr/lib/perl5/5.8 +.0/Exporter.pm line 17. [Mon Nov 27 20:29:50 2006] [error] [client] BEGIN failed--compilation +aborted at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/D +BI.pm line 250. [Mon Nov 27 20:29:50 2006] [error] [client ] Compilation failed in req +uire at /home/httpd/cgi-bin/mysql_kalai/selectPdb.pl line 9. [Mon Nov 27 20:29:50 2006] [error] [client] BEGIN failed--compilation +aborted at /home/httpd/cgi-bin/mysql_kalai/selectPdb.pl line 9.
still i dont know what is the problem here.but the program works fine in terminal
here with i send a progam..
please help
#!/usr/bin/perl -w print "content-type:text/html\n\n"; print "<html>"; print "<head>"; print "<body>"; use CGI; $cgi=new CGI; #BEGIN { $ENV{DBI_PUREPERL} = 1 } use DBI; #::PurePerl; $pdb=$cgi->param('pdb'); $dbh=DBI->connect('dbi:mysql:mysql','kalai','kavithai') or die "connec +tion failed : $DBI::errstr"; $pdb="1une"; $query="select * from pdbsummary where pdbid='$pdb'"; $exe=$dbh->prepare($query); $exe->execute(); while(@array=$exe->fetchrow_array()) { print @array; } $exe->finish; $dbh->disconnect; print "</body>"; print "</html>"; plz help me
20061127 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: error in perl with mysql
by shmem (Chancellor) on Nov 27, 2006 at 15:45 UTC | |
by kalaisuresh (Initiate) on Nov 28, 2006 at 05:08 UTC | |
by shmem (Chancellor) on Nov 28, 2006 at 11:06 UTC | |
|
Re: error in perl with mysql
by themage (Friar) on Nov 27, 2006 at 15:54 UTC | |
by kalaisuresh (Initiate) on Nov 28, 2006 at 04:11 UTC | |
|
Re: error in perl with mysql
by olus (Curate) on Nov 27, 2006 at 16:02 UTC | |
by davorg (Chancellor) on Nov 27, 2006 at 16:10 UTC | |
|
Re: error in perl with mysql
by BrowserUk (Patriarch) on Nov 27, 2006 at 15:32 UTC |