Perché il tuo php non supporta oci8!
se utilizzi Windows:
Scarica instantclient-basic-windows
da qui
Ccrea cartella
cd E:/wamp64/bin
mkdir oracle
Sposta il pacchetto client istantaneo scaricato in /oracle
mv instantclient-* E:/wamp64/bin/oracle
unzip instantclient-basic-windows.x64-12.1.0.2.0.zip
Aggiungi instantclient_xx
al tuo Path
e Modifica php.ini
Decommentali
extension=php_oci8_12c.dll
extension=php_odbc.dll
riavvia il tuo wamp vedrai il oci8
<?
phpinfo().
se usi Linux :
Scarica instantclient-basic-linux
e instantclient-sdk-linux
da qui
e decomprimilo in una directory.
mkdir /opt/oracle
mv instantclient-* /opt/oracle
unzip instantclient-basic-linux-x86-64-11.2.0.2.0
unzip instantclient-sdk-linux-x86-64-11.2.0.2.0
mv instantclient_11_2 instantclient
cd /opt
chown -R root:www-data /opt/oracle
echo /opt/oracle/instantclient > /etc/ld.so.conf.d/oracle-instantclient
ldconfig
cd /opt/oracle/instantclient
ln -s libclntsh.so.* libclntsh.so
ln -s libocci.so.* libocci.so
devi inserire 'instantclient,/opt/oracle/instantclient'
pecl install oci8
dopo aver finito.controlla se hai pci8.so nella directory come /usr/lib/php/20151012
cd /etc/php/7.0/mods-available/
vi oci.ini // extension=oci8.so
cd /etc/php/7.0/fpm/conf.d/
ln -s /etc/php/7.0/mods-available/oci.ini 20-oci.ini
aggiungi percorso
vi /etc/environment
# append
export LD_LIBRARY_PATH="/opt/oracle/instantclient"
export TNS_ADMIN="/opt/oracle/instantclient"
export ORACLE_BASE="/opt/oracle/instantclient"
export ORACLE_HOME=$ORACLE_BASE
Finalmente
service php7.0-fpm restart