Ubuntu instalando OCI8 para rodar no PHP

 Prerequisites:
sudo apt-get install build-essential
sudo apt-get install php5-dev php-pear libaio1

Then download the Oracle Instant Client from Oracle (you will need to create an account).
You will need the Basic (58MB) and SDK (600K) -- baixe as versões ZIP. The Basic Lite version does not work.
Vc precisará saber se seu servidor é AMD ou Intel e se é 32 ou 64 bits, clique aqui para conferir os comandos
crie a pasta lib se ela não existir
cd /usr/local/lib
sudo unzip <location-of-instant-client-basic>
sudo unzip <location-of-instant-client-sdk>
cd instantclient_11_2
sudo ln -s libclntsh.so.11.1 libclntsh.so
renomeie a pasta  instantclient_11_2
mv instantclient_11_2 instantclient

The symbolic link is needed during the compilation step later.
sudo pecl install oci8

You will be prompted for the location of the library:
instantclient,/usr/local/lib/instantclient

no meu caso eu apenas dei [enter] para ele localizar automaticamente, da maneira acima não funcionou.

PHP5 Instructions


You should now create a new oci8.ini file which will be included when loading php.ini (Editing the php.ini is discouraged):
nano /etc/php5/conf.d/oci8.ini

this will create a blank file; add to this file:
extension=oci8.so


Confira a instalação rodando phpinfo() no servidor.

Comentários

Postagens mais visitadas