in reply to error in perl with mysql

Hi kalaisuresh,

Are you running the script in terminal and as cgi in the same system? If not, did you installed DBI using CPAN or your package system, or did you copy some perl modules that you needed, as DBI (by ftp, for instance)?

Did you verify that your @INC have the same values in the terminal and when runned as cgi?

Try this script, run it in the terminal and as a cgi and compare the output from both runs:
#!/usr/bin/perl use strict; print "Content-type: text/plain\n\n"; print join "\n", @INC,"\n";
Hope this help you find your problem.

Replies are listed 'Best First'.
Re^2: error in perl with mysql
by kalaisuresh (Initiate) on Nov 28, 2006 at 04:11 UTC
    hai i rubn this program in both terminal and websrever i got the result in terminal ----------------------------- Perl version: 5.008 + INC: /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/perl5/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 . in browser ---------- Perl version: 5.008 INC: /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/perl5/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 .