Im trying to attach oracle to PHP on CentOS5.5. So far Ive been unable to do so.
The OCI8 module is not configured with PHP5.1 by default, and I havent found any YUM modules that install it. If there are no YUM install modules planned, is there a workaround. Any advice helps.
Thanks for Reading.
Guidance OCI8 installation/configuration for PHP
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: Guidance OCI8 installation/configuration for PHP
The [url=http://wiki.centos.org/AdditionalResources/Repositories?highlight=%28Remi%29]Remi Collet Repository[/url] seems to have what you are looking for. To use it I suspect you will have to install PHP with all the dependencies from that repo, replacing core packages. Please be sure you understand the implications of that before proceeding. Relevant links:
[url=http://wiki.centos.org/PackageManagement/Yum]PackageManagement/Yum[/url]
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]Installing Software[/url]
[url=http://wiki.centos.org/FAQ/General#head-472ce8446ebcfc82ca1800f775ba0e629ac835c7]FAQ#20. Where can I get the latest version of XyZ.rpm for CentOS? I cannot find it anywhere.[/url]
[url=http://wiki.centos.org/PackageManagement/Yum]PackageManagement/Yum[/url]
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]Installing Software[/url]
[url=http://wiki.centos.org/FAQ/General#head-472ce8446ebcfc82ca1800f775ba0e629ac835c7]FAQ#20. Where can I get the latest version of XyZ.rpm for CentOS? I cannot find it anywhere.[/url]
-
- Posts: 1
- Joined: 2011/01/20 05:04:42
- Contact:
Re: Guidance OCI8 installation/configuration for PHP
Hi,
Download the Basic and the SDK packages from http://www.oracle.com/technology/tec...antclient.html. At the time of this writing, the filenames are instantclient-basic-linux32-10.2.0.1-20050713.zip and instantclient-sdk-linux32-10.2.0.1-20050713.zip.
Unzip these files in a new directory, e.g. /opt/oracle/instantclient.
Try out this and let me know what happen
Download the Basic and the SDK packages from http://www.oracle.com/technology/tec...antclient.html. At the time of this writing, the filenames are instantclient-basic-linux32-10.2.0.1-20050713.zip and instantclient-sdk-linux32-10.2.0.1-20050713.zip.
Unzip these files in a new directory, e.g. /opt/oracle/instantclient.
Try out this and let me know what happen
Guidance OCI8 installation/configuration for PHP
have you try following php manual here :
http://www.php.net/manual/en/oci8.installation.php
I use PECL my self and it works fine including TNS connection
http://www.php.net/manual/en/oci8.installation.php
I use PECL my self and it works fine including TNS connection
Re: Guidance OCI8 installation/configuration for PHP
I prefer to use 11.1.0.7 zip versions, rpm versions are somewhat problematic at least for me...
- instantclient-basic-linux32-11.1.0.7.zip
- instantclient-sdk-linux32-11.1.0.7.zip
Download them to a folder, e.g. /opt/deploy/oracle/
then,
# cd /opt
# unzip /opt/deploy/oracle/instantclient-basic-linux32-11.1.0.7.zip
# unzip /opt/deploy/oracle/instantclient-sdk-linux32-11.1.0.7.zip
make a few required changes,
# cd /opt/instantclient_11_1
# ln -s libclntsh.so.11.1 libclntsh.so
# ln -s libocci.so.11.1 libocci.so
# cd /opt/deploy/oracle/
As of my writing, curent version is oci8-1.4.5.tgz
# cd /opt/deploy/oracle/
# pecl download oci8
# tar zxvf oci8-1.4.5.tgz
# cd oci8-1.4.5
# phpize
# ./configure --with-oci8=shared,instantclient,/opt/instantclient_11_1
# make
# make install
By making this, oci8 module will be copied to "/usr/lib/php/modules". To enable it,
# echo "extension=oci8.so" > /etc/php.d/oci8.ini
then restart httpd. Then you should see it enabled with "phpinfo()"
- instantclient-basic-linux32-11.1.0.7.zip
- instantclient-sdk-linux32-11.1.0.7.zip
Download them to a folder, e.g. /opt/deploy/oracle/
then,
# cd /opt
# unzip /opt/deploy/oracle/instantclient-basic-linux32-11.1.0.7.zip
# unzip /opt/deploy/oracle/instantclient-sdk-linux32-11.1.0.7.zip
make a few required changes,
# cd /opt/instantclient_11_1
# ln -s libclntsh.so.11.1 libclntsh.so
# ln -s libocci.so.11.1 libocci.so
# cd /opt/deploy/oracle/
As of my writing, curent version is oci8-1.4.5.tgz
# cd /opt/deploy/oracle/
# pecl download oci8
# tar zxvf oci8-1.4.5.tgz
# cd oci8-1.4.5
# phpize
# ./configure --with-oci8=shared,instantclient,/opt/instantclient_11_1
# make
# make install
By making this, oci8 module will be copied to "/usr/lib/php/modules". To enable it,
# echo "extension=oci8.so" > /etc/php.d/oci8.ini
then restart httpd. Then you should see it enabled with "phpinfo()"