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.,
Re: Apache cgi dbi::oracle error
by kyle (Abbot) on Feb 07, 2008 at 03:14 UTC
|
| [reply] |
|
Thanks a lot for your help...
| [reply] |
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.
| [reply] [d/l] |
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. | [reply] |
|
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
| [reply] |
|