Does anyone have a clue on how to install the Microsoft SQL PDO PHP Driver in OpenLiteSpeed? I've searched and searched and found nothing.
Preferably PHP7.4 but if you know of how to do this in any 7.x it should work.
Thanks!
Does anyone have a clue on how to install the Microsoft SQL PDO PHP Driver in OpenLiteSpeed? I've searched and searched and found nothing.
Preferably PHP7.4 but if you know of how to do this in any 7.x it should work.
Thanks!
To get pdo_sqlsrv, we can use PECL Extension For LSPHP.
sudo apt-get install lsphp74-pear -y
apt install unixodbc-dev -y
ln -s /usr/local/lsws/lsphp74/bin/php /usr/bin/php
pecl install pdo_sqlsrv
You should see output like this if build successfully.
Build process completed successfully
Installing '/usr/local/lsws/lsphp74/lib/php/20190902/pdo_sqlsrv.so'
install ok: channel://pecl.php.net/pdo_sqlsrv-5.9.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=pdo_sqlsrv.so" to php.ini
echo 'extension=pdo_sqlsrv.so' >> /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini
systemctl restart lsws