php 7.4 суулгаж тохируулсан байгаа
хэрэв aapanel-ийм бус system php суусан байвал устгаж php 7.4 cli тохируулна.
https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
тохирох instant client сонгоно. энэ удаад 21.13.0.0 хувилдар суулгана.
#/etc/php/8.1
sudo su
sudo rm -rf /etc/php
sudo rm /usr/bin/php
sudo ln -s /www/server/php/74/bin/php /usr/bin/php
sudo mkdir -p /opt/oracle/instantclient_2113/client64
chown -R root:www-data /opt/oracle
cd /opt/oracle/instantclient_2113/client64
unzip instantclient-basic-linux.x64-21.13.0.0.0dbru.zip
unzip instantclient-sqlplus-linux.x64-21.13.0.0.0dbru.zip
unzip instantclient-sdk-linux.x64-21.13.0.0.0dbru.zip
rm -rf *.zip
mv instantclient_21_13 lib
echo 'export ORACLE_HOME=/opt/oracle/instantclient_2113/client64/lib' >>~/.bashrc
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH' >>~/.bashrc
source ~/.bashrc
echo 'export ORACLE_HOME=/opt/oracle/instantclient_2113/client64/lib' >>~/.profile
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH' >>~/.profile
source ~/.profile
echo /opt/oracle/instantclient_2113/client64/lib >/etc/ld.so.conf.d/oracle.conf
ldconfig
apt-get update
apt-get install build-essential libaio1 php-pear
pecl channel-update pecl.php.net
pecl install oci8-2.2.0 --with-oci8=instantclient,/opt/oracle/instantclient_2113/client64/lib
echo 'extension=oci8.so' >>/www/server/php/74/etc/php.ini
echo 'extension=oci8.so' >>/www/server/php/74/etc/php-cli.ini
or
cd /www/server/php/74/etc/
nano php-cli.ini
nano php.ini
service php-fpm-74 restart