Det fordi din php ikke understøtter oci8!
hvis du bruger Windows:
Download instantclient-basic-windows
fra her
Opret mappe
cd E:/wamp64/bin
mkdir oracle
Flyt downloadet instantclient-pakke til /oracle
mv instantclient-* E:/wamp64/bin/oracle
unzip instantclient-basic-windows.x64-12.1.0.2.0.zip
Tilføj instantclient_xx
til din Path
og Rediger php.ini
Fjern kommentarer fra dem
extension=php_oci8_12c.dll
extension=php_odbc.dll
genstart din wamp, du vil se oci8
<?
phpinfo().
hvis du bruger Linux :
Download instantclient-basic-linux
og instantclient-sdk-linux
fra her
, og pak den ud i en mappe.
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
du skal indtaste 'instantclient,/opt/oracle/instantclient'
pecl install oci8
efter finish.check, om du har pci8.so i mappe som /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
tilføj sti
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
Endelig
service php7.0-fpm restart