html - DBI->Connect failed(install_driver(Oracle) failed: Can't locate DBD/Oracle.pm) -


i running cgi script onclick event in html.

html

<button onclick="self.location='http:**link**/test.cgi?myfield=prd7-qf_p7';">click me</button> 

test.cgi script

use dbi; use cgi::carp qw(carpout fatalstobrowser); begin {  $env{'oracle_home'}='/data/softs/oracle/10.2.0.3/';  $env{'ld_library_path'}='/data/softs/oracle/10.2.0.3/lib'; }  $cgi = cgi->new; #my $parameter = $cgi->param("myfield"); print "content-type: text/html\n\n"; $version = "2.1"; $cgi = cgi->new; $parameter = $cgi->param("myfield"); print "content-type: text/html\n\n"; print "this test perl script\n\n"; print "parameter=${parameter}\n"; $connection_details = dbstringtoconnection($parameter);  $amdora_tns_fm = @$connection_details[0]; $amdora_user_fm = @$connection_details[1]; $amdora_password_fm = @$connection_details[2]; $amdora_schema_fm = @$connection_details[3]; $amdora_service_fm = @$connection_details[4];  $dbhfm = dbi->connect("dbi:oracle:$amdora_tns_fm", $amdora_user_fm,$amdora_password_fm)   or die dbi->errstr; 

i setting oracle_home , ld_library_path @ start of file. when run cgi script unix terminal it's working fine. when run script browser html file, it's giving error:

install_driver(oracle) failed: can't locate dbd/oracle.pm in @inc (@inc contains: /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) @ (eval 9) line 3.  perhaps dbd::oracle perl module hasn't been installed, or perhaps capitalisation of 'oracle' isn't right. available drivers: dbm, examplep, file, gofer, proxy, sqlite, sponge, mysql.  @ /remote/users/sasahu/public_html/dashboard/test.cgi line 47 

i think dbi->connect use dbd::oracle package oracle connection, works fine in unix terminal, in browser gives above error.

could please how resolve problem. in advance.

looks have set environment variable oracle_home user runs apache webserver. , make available in apache.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -