note 62548 modified in ref.oci8 by sixd
| From: | sixd@php.net | Date: | Thu, 10 Apr 2008 22:31:02 +0000 |
| Subject: | note 62548 modified in ref.oci8 by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138155@lists.php.net to get a copy of this message | ||
Here are some tips on getting the instant client to work with php:
I am using Fedora Core 3 and php-5.1.2 on x86.
Install:
oracle-instantclient-basic-10.xxxx.i386.rpm
oracle-instantclient-devel-10.xxxx.i386.rpm
Configuring php:
./configure --with-oci8=instantclient,/usr/lib/oracle/10.xxx/client/lib/
This path will change if you unzip it isntead of using the rpms. Make sure it points to where
libclntsh.so is installed.
Configuring apache:
The following lines need to be in your .../apache/bin/envvars file:
LD_LIBRARY_PATH="/usr/lib/oracle/10.xxx/client/lib/: /opt/apache2/lib:$LD_LIBRARY_PATH"
TNS_ADMIN="/usr/lib/oracle/10.1.0.4/client/lib/"
LANG=en_US
export LD_LIBRARY_PATH LANG TNS_ADMIN
You will need to modify the paths to the oracle instantclient libs and to apache. In addition, the
language will need to be modified if not US English.
TNS Names and Oracle:
Put the tnsnames.ora and sqlnet.ora files into the same directory as libclntsh.so.
Restart apache and you should be able to connect.
--was--
Here are some tips on getting the instant client to work with php:
I am using Fedora Core 3 and php-5.1.2 on x86.
Install:
oracle-instantclient-basic-10.xxxx.i386.rpm
oracle-instantclient-devel-10.xxxx.i386.rpm
Configuring php:
./configure --with-oci8=instantclient,/usr/lib/oracle/10.xxx/client/lib/
This path will change if you unzip it isntead of using the rpms. Make sure it points to where
libclntsh.so is installed.
Configuring apache:
The following lines need to be in your .../apache/bin/envvars file:
LD_LIBRARY_PATH="/usr/lib/oracle/10.xxx/client/lib/: /opt/apache2/lib:$LD_LIBRARY_PATH"
TNS_ADMIN="/usr/lib/oracle/10.1.0.4/client/lib/"
LANG=en_US
export LD_LIBRARY_PATH LANG TNS_ADMIN
You will need to modify the paths to the oracle instantclient libs and to apache. In addition, the
language will need to be modified if not US English.
TNS Names and Oracle:
Put the tnsnames.ora and sqlnet.ora files into the same directory as libclntsh.so.
Restart apache and you should be able to connect.
http://php.net/manual/en/ref.oci8.php