Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Apache cgi dbi::oracle error

by rampec (Initiate)
on Feb 07, 2008 at 02:53 UTC ( [id://666719]=perlquestion: print w/replies, xml ) Need Help??

rampec has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have written a simple perl script to connect to the oracle database in sunsolaris unix box. The script is working fine when executed alone as a perl script. But if I move it to the apache server it is showing the below error. Pls help on this one '/usr/local/perl-583-Oracle9/lib/site_perl/5.8.3/sun4-solaris/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1: perl5.8.3: fatal: /oracle/product/9.2.0/lib/libclntsh.so.9.0: wrong ELF class: ELFCLASS64 at /usr/local/perl-583-Oracle9/lib/5.8.3/sun4-solaris/DynaLoader.pm line 229.,

Replies are listed 'Best First'.
Re: Apache cgi dbi::oracle error
by kyle (Abbot) on Feb 07, 2008 at 03:14 UTC
      Thanks a lot for your help...
Re: Apache cgi dbi::oracle error
by olus (Curate) on Feb 07, 2008 at 17:32 UTC

    Check your http.conf file and look for PERL5LIB. If it is present, it may be setting your script handler to a different perl. Maybe you have more than one perl installed on your system.

Re: Apache cgi dbi::oracle error
by Errto (Vicar) on Feb 07, 2008 at 17:14 UTC
    When you say "move it to the Apache server" is that a different physical machine? I'm not a Solaris expert but just from the text itself it sounds like it might be an architecture issue, like you're calling 64-bit Oracle libraries from 32-bit Perl or vice versa, but if it were the same machine that wouldn't happen. The only other generic thing I can think of is environment variables: to make DBD::Oracle work you need at least ORACLE_HOME and possibly LD_LIBRARY_PATH set depending on the setup.
      Hi, Thanks for your reply you are right; I have added the env variable in the httpd.conf file to fix this issue and the ld_libraray_path pointing to lib32. Regards, Ram

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://666719]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-23 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found