- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HP UX - PERL 5.8.8 DBD :: Oracle problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-16-2008 12:44 PM
тАО09-16-2008 12:44 PM
My problem is i am executing perl script from command prompt to query the Oracle database. It works fine from command prompt.
But if i try to execuite the script by placing it in Apache and calling it through browser it does not execute and gives out following error in error_log
install_driver(Oracle) failed: Can't load '/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file or directory at /opt/perl5/lib/5.8.8/PA-RISC2.0-thread-multi-LP64/DynaLoader.pm line 230.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /opt/hpws/apacheNew/cgi-bin/TestDB.pl line 5
>>>>>>>>>>>>>
os : HP-UX srvhp4 B.11.23 U 9000/800
perl 5.8.8 (with threading)
DBI : 1.607
DBD:Oracle - 1.14
>>>>
>>>>>>>>>TestDB.pl
#!/opt/perl5/bin/perl
use DBI;
use CGI;
my $dbh = DBI->connect('dbi:Oracle:', q{websmgr/websmgr@(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP) (HOST=172.18.1.224)(PORT=1521))
(CONNECT_DATA=(SID=WEBS)))}, "") || die "Database connection not made: $DBI::errstr";
my $sql = qq{ select * from EF_DJS_CIRCUIT_ATTENDEES };
my $sth = $dbh->prepare( $sql );
$sth->execute();
while (@data = $sth->fetchrow_array()) {
print"DATA is = "."$data[0]"."\n";
}
$dbh->disconnect();
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-16-2008 12:47 PM
тАО09-16-2008 12:47 PM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2008 11:16 AM
тАО09-17-2008 11:16 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
I did exporting the env variable through profile. or even set that variables in httpd.conf as below
SetEnv ORACLE_HOME /orasw/oracle/product/db10g
PassEnv ORACLE_HOME
SetEnv LD_LIBRARY_PATH /orasw/oracle/product/db10g/lib64
PassEnv LD_LIBRARY_PATH
SetEnv LD_RUN_PATH /orasw/oracle/product/db10g/lib64:/orasw/oracle/product/db10g/lib
PassEnv LD_RUN_PATH
SetEnv SHLIB_PATH /orasw/oracle/product/db10g:/orasw/oracle/product/db10g/lib
PassEnv SHLIB_PATH
SetEnv PATH /opt/perl5/bin:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64/auto/DBD/Oracle:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64:/orasw/oracle/product/db10g/lib64:/orasw/oracle/product/db10g/lib
PassEnv PATH
SetEnv LD_PRELOAD /opt/perl5/bin:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64/auto/DBD/Oracle:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64/:/orasw/oracle/product/db10g/lib64:/orasw/oracle/product/db10g/lib
PassEnv LD_PRELOAD
also exported them manually, but still no result. Its shows the same error again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2008 11:24 AM
тАО09-17-2008 11:24 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
How about setting the env in the perl script ?
e.g.
$ENV{ORACLE_HOME} = '/u01/oracle/product/10.2';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-17-2008 12:10 PM
тАО09-17-2008 12:10 PM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
$ENV{ORACLE_HOME} = '/orasw/oracle/product/db10g';
$ENV{SHLIB_PATH}='/orasw/oracle/product/db10g/lib';
$ENV{LD_PRELOAD}='/opt/perl5/bin:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64/auto/DBD/Oracle:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64:$ORACLE_HOME:$ORACLE_HOME/lib';
$ENV{LD_RUN_PATH}='/orasw/oracle/product/db10g/lib64:/orasw/oracle/product/db10g/lib';
$ENV{LD_LIBRARY_PATH}='/orasw/oracle/product/db10g/lib';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 01:09 AM
тАО09-18-2008 01:09 AM
SolutionWill show you what libraries it requires, make sure that SHLIB_PATH and/ot LD_LIBRARY_PATH include the locations to those libraries before you start apache.
Enjoy, Have FUN! H.Merijn [ who'd love to see Oracle 10 die a horrible death ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 05:56 AM
тАО09-18-2008 05:56 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
(:-)) Do you think PostgreSQL could be Oracle's death blow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 06:05 AM
тАО09-18-2008 06:05 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
It just happens that Oracle manages to make me curse way more than Postgres or Unify.
OK, I'll just use CSV then :)
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 06:14 AM
тАО09-18-2008 06:14 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
> Merijn: OK, I'll just use CSV then :)
Well, that's not surprising :-))
http://search.cpan.org/~hmbrand/Text-CSV_XS-0.54/
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 06:22 AM
тАО09-18-2008 06:22 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
I did chatr on Oracle.sl and it showed results as follow
$ chatr Oracle.sl
Oracle.sl:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /orasw/oracle/product/db10g/lib64:/lib/pa20_64
shared library list:
libclntsh.sl.10.1
librt.2
libpthread.1
libnsl.1
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
5 text 4000000000000000 z---c- D (default)
6 data 8000000100000000 ---m-- D (default)
static branch prediction disabled
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap disabled
I did found out the location of each library and exported with full path as below
export LD_LIBRARY_PATH=/usr/lib:/usr/lib/pa20_64:/orasw/oracle/product/db10g/lib:/orasw/oracle/product/db10g/lib/libclntsh.sl.10.1:/usr/lib/pa20_64/librt.2:/usr/lib/pa20_64/libpthread.1:/usr/lib/pa20_64/libnsl.1
export SHLIB_PATH=/usr/lib:/usr/lib/pa20_64:/orasw/oracle/product/db10g/lib:/orasw/oracle/product/db10g/lib/libclntsh.sl.10.1:/usr/lib/pa20_64/librt.2:/usr/lib/pa20_64/libpthread.1:/usr/lib/pa20_64/libnsl.1
export LD_PRELOAD=/usr/lib:/usr/lib/pa20_64:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64/auto/DBD/Oracle:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64:/orasw/oracle/product/db10g:/orasw/oracle/product/db10g/lib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 06:26 AM
тАО09-18-2008 06:26 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-18-2008 11:29 AM
тАО09-18-2008 11:29 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
Yes i have the correct apache because i had built it from the source.
However i was able to figure out the problem by chatr on Oracle.sl as recomended by Merijn Brand. Doing that i found out that the execution permission were not set correctly for user webserver.
so now i am having another trouble
Database connection not made: ERROR OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settings, permissions, etc. at /opt/hpws/apacheNew/cgi-bin/Test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2008 01:12 AM
тАО09-19-2008 01:12 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
I hate locates that do not match (in decreasing preference) UTF8, ISO-8859-1, or C (7-bit ASCII). There will always be some sort of mismatch.
Then you can create your database in one locale, and (try to) access it in another. That sucks.
Way too many things to check, and way too many points of error.
Enjoy, Have FUN! H.Merijn [ Care to rate the answers? ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2008 07:28 AM
тАО10-16-2008 07:28 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
IF you dont have the oracle variable you can export them through httpd.conf as below
edit the httpd.conf and add the following lines for oracle library
SetEnv ORACLE_HOME /orasw/oracle/product/db10g
PassEnv ORACLE_HOME
SetEnv LD_LIBRARY_PATH=/orasw/oracle/product/db10g/lib
PassEnv LD_LIBRARY_PATH
SetEnv SHLIB_PATH=/orasw/oracle/product/db10g/lib
PassEnv SHLIB_PATH
SetEnv LD_PRELOAD
/opt/perl5/bin:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64/auto/DBD
/Oracle:/opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-thread-multi-LP64:/orasw/oracle/product/db10
g:/orasw/oracle/product/db10g/lib
PassEnv LD_PRELOAD
SetEnv LD_RUN_PATH /orasw/oracle/product/db10g/lib64:/orasw/oracle/product/db10g/lib
PassEnv LD_RUN_PATH
Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2008 07:29 AM
тАО10-16-2008 07:29 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
PLease seee the thread for the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2008 08:13 AM
тАО10-16-2008 08:13 AM
Re: HP UX - PERL 5.8.8 DBD :: Oracle problem
please note that you aslo get the bunny assigned if you assign points.
See also:
http://forums11.itrc.hp.com/service/forums/helptips.do?#28
and
http://forums11.itrc.hp.com/service/forums/helptips.do?#33
V.