note 83323 added to oci8.setup
| From: | mikeatmacgirvin dot com at osu1 dot php dot net | Date: | Wed, 21 May 2008 01:05:29 +0000 |
| Subject: | note 83323 added to oci8.setup | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139567@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
----
Server IP: 117.104.160.194
Probable Submitter: 150.101.202.72
----
Manual Page -- http://www.php.net/manual/en/oci8.setup.php
Edit -- https://master.php.net/note/edit/83323
Del: integrated -- https://master.php.net/note/delete/83323/integrated
Del: useless -- https://master.php.net/note/delete/83323/useless
Del: bad code -- https://master.php.net/note/delete/83323/bad+code
Del: spam -- https://master.php.net/note/delete/83323/spam
Del: non-english -- https://master.php.net/note/delete/83323/non-english
Del: in docs -- https://master.php.net/note/delete/83323/in+docs
Del: other reasons-- https://master.php.net/note/delete/83323
Reject -- https://master.php.net/note/reject/83323
Search -- https://master.php.net/manage/user-notes.php