LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > PHP > Install help for connecting to oracle database

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2007, 08:09 AM
reshu1596 reshu1596 is offline
Member
 
Join Date: Feb 2007
Posts: 22
Default Install help for connecting to oracle database

Hi: I want to use php with lightspeed server to connect to an oracle database. Any pointers on what additional steps I need to do after installing lightspeed?

Thanks in advance
Ray
Reply With Quote
  #2  
Old 02-04-2007, 09:44 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Just follow the steps on our wiki to compile your own PHP binary with oracle module included.
Reply With Quote
  #3  
Old 02-04-2007, 11:26 AM
reshu1596 reshu1596 is offline
Member
 
Join Date: Feb 2007
Posts: 22
Quote:
Originally Posted by mistwang View Post
Just follow the steps on our wiki to compile your own PHP binary with oracle module included.

Hi: not sure which link in wiki corresponds to what you are talking about. Is it this one: PHP 4/5 with LSAPI (http://www.litespeedtech.com/support...wiki:php:lsapi) ?

Thanks
ray
Reply With Quote
  #4  
Old 02-04-2007, 01:53 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
Ray, yes that's that the right wiki article. Just follow the addition steps/config lines required for oracle driver via www.php.net instructions. Our wiki tells you how to compile optimized PHP for LiteSpeed. You need to visit php.net to find out how to compile oracle driver for PHP.
Reply With Quote
  #5  
Old 02-04-2007, 06:45 PM
reshu1596 reshu1596 is offline
Member
 
Join Date: Feb 2007
Posts: 22
Quote:
Originally Posted by xing View Post
Ray, yes that's that the right wiki article. Just follow the addition steps/config lines required for oracle driver via www.php.net instructions. Our wiki tells you how to compile optimized PHP for LiteSpeed. You need to visit php.net to find out how to compile oracle driver for PHP.
One more question. Do I need to have oracle client installed on the machine where I am installing the LiteSpeed and PHP?

Thanks
Ravi
Reply With Quote
  #6  
Old 02-04-2007, 09:32 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Yes, I think you probably need to install oracle client, at least make OCI client library and header file available.
Reply With Quote
  #7  
Old 02-05-2007, 04:55 AM
reshu1596 reshu1596 is offline
Member
 
Join Date: Feb 2007
Posts: 22
Quote:
Originally Posted by mistwang View Post
Yes, I think you probably need to install oracle client, at least make OCI client library and header file available.
Hi:
Sorry I am new to PHP and am trying to understand what I have to do and why. In the perl world, I would install perl and add the DBI and DBD:Oracle modules to be able to connect to a oracle database. But in the PHP world you are saying the PHP does not come with modules/libraries necessary to connect to a oracle database. Rather, I have to compile PHP with oracle support. Am I correct?

So in Step 5 (wiki), I will run something like the following
./configure '--prefix=/php5' '--with-litespeed' '--with-config-file-path=../conf' --with-oracle=$ORACLEHOME --with-oci8=$ORACLEHOME

The oracle PHP FAQ also says the following
Ensure that your "extension_dir" parameter (in php.ini) points to the location where the above extension files reside.

What exactly do I have to add in ~lsws/conf/php.ini?

Thanks for your help.
Ravi
Reply With Quote
  #8  
Old 02-05-2007, 09:37 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
The Oracle PHP extension modules were compiled into the PHP binary with option "--with-oracle=... --with-oci8=...", you don't need to do anything about "extension_dir", that's for the pre-compiled Oracle modules.

Your PHP binary should work well with Oracle now.
Reply With Quote
  #9  
Old 02-07-2007, 07:07 AM
reshu1596 reshu1596 is offline
Member
 
Join Date: Feb 2007
Posts: 22
Quote:
Originally Posted by mistwang View Post
The Oracle PHP extension modules were compiled into the PHP binary with option "--with-oracle=... --with-oci8=...", you don't need to do anything about "extension_dir", that's for the pre-compiled Oracle modules.

Your PHP binary should work well with Oracle now.

Hi: after compiling and completing all the steps, When I try to access a php page with oracle functions, I get a page saying

504 Service Unavailable


I notice the following error in /lswsinstall/logs/stderr.log
ld.so.1: lsphp: fatal: libnnz10.so: open failed: No such file or directory


I have this file in the LD_LIBRAY_PATH. Why is litespeed not able to find it

bash-2.05$ echo $LD_LIBRARY_PATH
/export/home/rawlog/oracle/instantclient_10_2:/usr/local/lib:/oracle/g01/software/rdbms/9.2.0.6/lib:/usr/lib
bash-2.05$ ls -l /export/home/rawlog/oracle/instantclient_10_2/libnnz10.so
-rwxr-xr-x 1 rawlog staff 6135928 Feb 6 15:22 /export/home/rawlog/oracle/instantclient_10_2/libnnz10.so


Thanks
Ravi
Reply With Quote
  #10  
Old 02-07-2007, 08:51 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Try adding LD_LIBRARY_PATH to the "environment" section of the lsphp external application.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:42 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.