|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Hello Friends,
I am facing the problem when one of my test program tries to access the oracle database on NT using unix program on unix box. The program works fine on unix prompt. but when tried to get the output in the webbrowser it shows blank screen Program code: ------------------- #!/compat/linux/usr/bin/perl #print "Content-type= text/htmlnn"; print "Content-type: text/htmlnn"; use DBI; $dbh=DBI->connect("dbi:Oracle:host=10.0.0.151;sid=ORACLE;port=1521","esugar","esugar"); $stmt=$dbh->prepare("select * from tab"); #$stmt=$dbh->prepare("Show Table"); $stmt->execute; while(my(@temparray)=$stmt->fetchrow_array) { print "$temparray[0]t$temparray[1]t$temparray[2]n"; } -------------------------- httpd Error Log: install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/i386-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.1.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/i386-linux/5.00405/DynaLoader.pm line 169. at (eval 1) line 2 at /usr/local/www/data/oraperremote.pl line 7 --------------------------------------- The solution for this will be appreciated. Thanks Sameer |
|
#2
|
|||
|
|||
|
It looks like the directory with the Oracle libraries is not a part of the LD_LIBRARY_PATH setting for the userid the CGI programs execute under. Add the directory containing "libcntlsh.so.1.0" to the LD_LIBRARY_PATH setting. You can do this in your program with <code>$ENV{"LD_LIBRARY_PATH"} .= ":/some/Oracle/path/"</code> This needs to appear before the <code>use DBI;</code> statement.
If you're running the program under mod_perl, you might want to make this setting in the script that starts your web server, so you don't have to add it you all your programs. Or you can set it in the environment for the userid used for your web server or cgi programs (whichever is appropriate). Things worked when you run it at the command-line because the LD_LIBRARY_PATH is set for the userid you were testing with. [This message has been edited by mccarren (edited December 10, 2000).] |
|
#3
|
|||
|
|||
|
I tried adding LD_LIBRARY_PATH to the code, before use DBI but with no sucess. In fact when running a test database script from the command prompt, only root and the oracle user can run it, whilst the other users cannot. any other suggestions? many thanks
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Problems while accessing Oracle database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|