|
|

02-04-2007, 08:09 AM
|
|
Member
|
|
Join Date: Feb 2007
Posts: 22
|
|
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
|

02-04-2007, 09:44 AM
|
|
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.
|

02-04-2007, 11:26 AM
|
|
Member
|
|
Join Date: Feb 2007
Posts: 22
|
|
Quote:
Originally Posted by mistwang
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
|

02-04-2007, 01:53 PM
|
|
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.
|

02-04-2007, 06:45 PM
|
|
Member
|
|
Join Date: Feb 2007
Posts: 22
|
|
Quote:
Originally Posted by xing
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
|

02-04-2007, 09:32 PM
|
|
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.
|

02-05-2007, 04:55 AM
|
|
Member
|
|
Join Date: Feb 2007
Posts: 22
|
|
Quote:
Originally Posted by mistwang
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
|

02-05-2007, 09:37 AM
|
|
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.
|

02-07-2007, 07:07 AM
|
|
Member
|
|
Join Date: Feb 2007
Posts: 22
|
|
Quote:
Originally Posted by mistwang
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
|

02-07-2007, 08:51 AM
|
|
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.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:26 AM.
|
|