CakeFest 2024: The Official CakePHP Conference

Requerimientos

La extensión OCI8 1.4 está incluida con PHP 5.3, PHP 5.4 y PHP 5.5. También está disponible desde » PECL.Una nueva versión, OCI8 2.0, está disponible solamente desde » PECL. OCI8 1.4 requiere las bibliotecas cliente de Oracle 12c, 11g, 10g o 9iR2 y la instalación en PHP 4.3.9 o superior. OCI8 2.0 requiere las bibliotecas cliente de Oracle 12c, 11g o 10g y la instalalción en PHP 5.2 o superior.

Si Oracle Database está en la misma máquina que PHP, el software de bases de datos ya contiene las bibliotecas necesarias. Cuando PHP está en una máquina diferente, use las bibliotecas gratuitas de » Oracle Instant Client.

Para usar Oracle Instant Client, instale el fichero ZIP de Oracle Instant Client basic o basiclite o el paquete RPM. Al construir PHP desde el código fuente, también instale el fichero ZIP sdk o el paquete RPM devel.

Se ha de ejecutar PHP con la misma versión, o una más reciente, de las bibliotecas de Oracle con las que OCI8 fue construid.

En Windows, la DLL php_oci8 DLL necesita las bibliotecas cliente de Oracle desde la versión 10gR2 o superior. En PHP 5.3 hasta e incluyendo PHP 5.3.5, la DLL php_oci8_11g requiere las bibliotecas cliente de Oracle 11gR1 o superior. Desde PHP 5.3.6, la DLL php_oci8_11g requiere las bibliotecas cliente de Oracle 11gR2 o superior. La DLL php_oci8_12c de PECL requiere las bibliotecas cliente de Oracle 12cR1. Con algunas versiones de Instant Client se podrían necesitar además las bibliotecas mfc71.dll y msvcr71.dll.

Nota:

Si OCI8 usa las bibliotecas cliente 9iR2, PHP se puede conectar a Oracle Database 8i, 9iR2, 10g o 11g. Si OCI8 usa las bilbiotecas cliente 10gR2, la base de datos puede ser 9iR2, 10g, 11g o 12c. Si OCI8 usa las bibliotecas cliente 11g, la base de datos puede ser 9iR2, 10g, 11g o 12c. Si OCI8 usa las bibliotecas cliente 12c, la base de datos puede ser 10gR2, 11g o 12c.

Nota:

El soporte completo para las características de OCI8 solamente está disponible al usar la versión más reciente de las bibliotecas cliente y base de datos de Oracle.

add a note

User Contributed Notes 5 notes

up
5
Wilber
1 year ago
The OCI8 extension lets you access Oracle Database.

Use 'pecl install oci8' to install for PHP 8.1.

Use 'pecl install oci8-3.0.1' to install for PHP 8.0.

Use 'pecl install oci8-2.2.0' to install for PHP 7.

Use 'pecl install oci8-2.0.12' to install for PHP 5.2 - PHP 5.6.

Use 'pecl install oci8-1.4.10' to install for PHP 4.3.9 - PHP 5.1.

[username@hostname ~]# php -v
^ To see PHP version
up
4
Andi,post at rueckauer dot nospam dot ch
5 years ago
The provided link to the Oracle Instant Client is not valid anymore. Visit http://www.oracle.com/technetwork/database/database-technologies/instant-client/downloads/index.html instead.
up
3
Rainer Perske
6 years ago
Oracle Instant Client provides its own LDAP library that may be incompatible to the LDAP library provided by the operating system.

Segmentation faults and other errors can happen if you load an OCI8 extension into a PHP containing LDAP support or if you load a PHP module with OCI8 into an Apache server with LDAP support.

But this depends heavily on the exact versions of operating system, system LDAP library, PHP, OCI8, and other pieces of software involved.
up
0
charles dot fisher at arconic dot com
4 years ago
Oracle's development package includes an ldap.h file that causes compilation attempts of PHP to fail.

For the oracle-instantclient12.2-devel 64-bit RPM, this file is found in the following path:

/usr/include/oracle/12.2/client64/ldap.h

Rename this file to ldap.h-oracle.

After doing so, and assuming there are no other build problems, PHP will compile (even when ldap and oci are configured in the build).
up
0
sgfan at gmx dot net
6 years ago
I can confirm Rainer's observations and this not limited to PHP. One cannot link libopenldap with C with Oracle driver without crashing the app at runtime. Same here on HP-UX. Both won't play nice at all.
To Top