I need to use php to connect oracle database on an ARM mechine, but there are no released version of Oracle Instant Client for ARM linux.
How can I enable oci extension on the ARM linux ?
Or can I use something other than oci to connect Oracle ?
Any help or idea ?
Thanks.
Oracle Instant Client for Linux ARM64 is available from https://www.oracle.com/database/technologies/instant-client/linux-arm-aarch64-downloads.html
Related
I have to upgrade a system from php5.6 to php7.2. The system uses an oracle 10.1 database.
Now I tried to collect all infos but am still confused about the compatibility between php, oci8, instant client and the database.
I read, that with php7 I have to at least install oci8 2.1, but this doesn't work with oracle 10.1.
Is that correct?
Or is it possible to run php7 with oracle 10.1?
Please enlighten me :)
I read, that with php7 I have to at least install oci8 2.1, but this doesn't work with oracle 10.1.
Is that correct?
No. From the manual:
OCI8 2.0 requires Oracle 12c, 11g or 10g client libraries and will install on PHP 5.2 onwards.
Note that the Oracle client version you use doesn't need to match the server version. From the same manual page (reformatted into bullet points for ease of reading):
If OCI8 uses 9iR2 client libraries, then PHP can connect to Oracle Database 8i, 9iR2, 10g or 11g.
If OCI8 uses 10gR2 client libraries, the database can be 9iR2, 10g, 11g or 12c.
If OCI8 uses 11g client libraries, the database can be 9iR2, 10g, 11g or 12c.
If OCI8 uses 12c client libraries, the database can be 10gR2, 11g or 12c.
So only the last scenario (12c client libraries) requires a database version greater than 10.1.
Regardless of what the manual says, I would strongly recommend building a test instance and seeing if you have any issues.
Edit:
Further information from the OCI8 package PECL page:
Oracle's standard cross-version connectivity applies. For example,
PHP OCI8 linked with Instant Client 11.2 can connect to Oracle
Database 9.2 onward. See Oracle's note "Oracle Client / Server
Interoperability Support" (ID 207303.1) for details.
I have downloaded;
Oracle Linux 7.2
Oracle Database 12c for Linux
Oracle Instance Client for 12c
(All are of the same version)
What I was successful with;
Installing Oracle Linux on VMWare
Installing Oracle Database 12c
I need to;
Install LAMP with the capability of connecting to Oracle Database.
Install Instant Client with the capability of connecting php to Oracle Database.
Install phpmyadmin
Please Help ...
There are PHP RPMs (including one for the PHP OCI8 driver to connect to Oracle Database) at http://yum.oracle.com/oracle-linux-php.html
You will need to install the 'Basic' package from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html first (this requires a click-through so it can't be in a yum channel). It sounds like you have done this.
There's a lot of useful info about PHP OCI8 in the back half of this free book: http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html
I've got:
Red Hat Enterprise Linux Server release 7.4 (Maipo)
PHP 5.4.16
Apache/2.4.6 (Red Hat Enterprise Linux)
Oracle12c DataBase
What version of OCI8 and Oracle Instant Client should I use?
Thanks a lot!
For PHP 5.2, 5.3, 5.4, 5.5 and 5.6 use the latest PHP OCI8 2.0 you can. Currently the most recent is 2.0.12 on https://pecl.php.net/package/oci8. Use 'pecl install oci8-2.0.12' to install it.
If your database is on a remote machine use Instant Client 12.2. Oracle Database supports client-to-server library version interoperability so you can use older or new Oracle client versions, if necessary. The latest client (12.2) has some improvements - of course!
If your database is on the same machine that PHP is on, you don't need Instant Client.
I have oracle 12c R2 installed and xampp with php 7.1.7. Oracle 12c is 64 bit on my 64 bit windows 10 machine. But xampp is 32 bit.
How do I connect my oracle 12c with php?
Do I need to download oracle 12c 32 bit client and then use oci8?
If XAMPP is 32-bit, then you need 32-bit Oracle client libraries in your PATH since the PHP executable & OCI8 extension will be running as 32-bit.
If you also have a database on the same machine, make sure not to stuff up anything if you change PATH globally. You might need to change PATH just for XAMPP.
The Oracle Net layer between PHP OCI8 and the database will handle any 32-bit to 64-bit data conversions.
I need to connect to an Oracle 8i server, but oci8 does not support it by default.
The php documentation says as following:
Note:
If OCI8 uses 9iR2 client libraries, then PHP can connect to Oracle Database 8i, 9iR2, 10g or 11g. If OCI8 uses 10gR2 client libraries, the database can be 9iR2, 10g, 11g or 12c. If OCI8 uses 11g client libraries, the database can be 9iR2, 10g, 11g or 12c. If OCI8 uses 12c client libraries, the database can be 10gR2, 11g or 12c.
How can I setup OCI8 to use 9iR2 client libraries?
My current environment is:
I'm on a ubuntu server,
Oracle 8i version 8.1.7.4.0
I have already installed instantclient libraries(I'm able to connect to oracle 10i and above)
I'm using instantclient version 12.1... Also tried with instantclient version 10.2
Could someone help me figuring out what the problem might be and how to solve it? Any help is really appreciated.
Thank you