note 83323 modified in oci8.setup by sixd
| From: | sixd@php.net | Date: | Fri, 26 Jun 2009 18:48:37 +0000 |
| Subject: | note 83323 modified in oci8.setup by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157604@lists.php.net to get a copy of this message | ||
Some notes to save somebody some grief:
Installing the Oracle libraries and access module into an existing PHP5 installation on Debian etch
without rebuilding php...
First grab the Linux instantclient from oracle.com - you'll also need the client SDK kit. Here
I'm using instantclient 11.1
create a directory for these such as /home/oracle and unpack both of them to that directory.
Go into the oracle directory (and into the instantclient_11_1 directory) and create a symlink:
$ ln -s libclntsh.so.11.1 libclntsh.so
Grab the oci8 PECL package and unpack it somewhere (~/oci).
Make sure you have the following packages (in addition to php5, php5-cli, apache2, etc).
php5-dev
libaio1
php-pear
Go to the oci8 directory (~/oci/).
You need to run 'pecl build' once to create the configure script.
$pecl build
But the problem is that pecl build will claim the files are installed and they are not. I wasted
half a day on this one. Now go into the oci8-1.3.0 directory and build again by hand:
$ cd oci8-1.3.0
$ ./configure --with-oci8=instantclient,/home/oracle/instantclient_11_1
$ make
Fix any errors/warnings before continuing
Don't make install, which won't work.
$ cp ./modules/oci8.so /usr/lib/php5/20060613+lfs
Replace 20060613+lfs with whatever module directory has been setup for you in /usr/lib/php5
Create /etc/php5/conf.d/oci8.ini:
----
extension=oci8.so
----
Now run the php cmdline in verbose mode (php -v) and see if everything loaded. Fix it if it
didn't.
You may need some env variables setup in your /etc/init.d/apache2 file to make everything work and
actually execute queries, but a phpinfo() at this point should show your oci8 extension. See the
php.net Oracle pages if you need help with the env variables.
Restart the web server
$ /etc/init.d/apache2 restart
--was--
Some notes to save somebody some grief:
Installing the Oracle libraries and access module into an existing PHP5 installation on Debian etch
without rebuilding php...
First grab the Linux instantclient from oracle.com - you'll also need the client SDK kit. Here
I'm using instantclient 11.1
create a directory for these such as /home/oracle and unpack both of them to that directory.
Go into the oracle directory (and into the instantclient_11_1 directory) and create a symlink:
$ ln -s libclntsh.so.11.1 libclntsh.so
Grab the oci8 PECL package and unpack it somewhere (~/oci).
Make sure you have the following packages (in addition to php5, php5-cli, apache2, etc).
php5-dev
libaio1
php-pear
Go to the oci8 directory (~/oci/).
You need to run 'pecl build' once to create the configure script.
$pecl build
But the problem is that pecl build will claim the files are installed and they are not. I wasted
half a day on this one. Now go into the oci8-1.3.0 directory and build again by hand:
$ cd oci8-1.3.0
$ ./configure --with-oci8=instantclient,/home/oracle/instantclient_11_1
$ make
Fix any errors/warnings before continuing
Don't make install, which won't work.
$ cp ./modules/oci8.so /usr/lib/php5/20060613+lfs
Replace 20060613+lfs with whatever module directory has been setup for you in /usr/lib/php5
Create /etc/php5/conf.d/oci8.ini:
----
extension=oci8.so
----
Now run the php cmdline in verbose mode (php -v) and see if everything loaded. Fix it if it
didn't.
You may need some env variables setup in your /etc/init.d/apache2 file to make everything work and
actually execute queries, but a phpinfo() at this point should show your oci8 extension. See the
php.net Oracle pages if you need help with the env variables.
Restart the web server
$ /etc/init.d/apache2 restart
http://php.net/manual/en/oci8.setup.php