I'm trying to host WordPress website on Azure Linux App service.
I got this error:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
I searched everywhere but I didn't find how to install the MYSQL driver to Liunx based Azure PHP App service.
What I know that I have to do some changes to an ini
file; But I don't know how.
I already tried to install mysql using:
apt-get install php-mysql
I got this error
When I tried:
yum install php-mysqlnd
The command
apt-cache search php
Shows:
I have resolved this issue.
Go to /usr/local/lib/php/extensions/ cd /usr/local/lib/php/extensions/
then do ls
you will find the extensions directory starting with no-debug-non-zts
in my case years ago it was no-debug-non-zts-20180731
then go to your .ini file and the extensions:
extension=/usr/local/lib/php/extensions/[replace-wthi-your-extention-directory]/mysqli.so extension=/usr/local/lib/php/extensions/[replace-wthi-your-extention-directory]/pdo_mysql.so extension=/usr/local/lib/php/extensions/[replace-wthi-your-extention-directory]/sockets.so extension=/usr/local/lib/php/extensions/[replace-wthi-your-extention-directory]/pdo.so extension=/usr/local/lib/php/extensions/[replace-wthi-your-extention-directory]/mcrypt.so extension=/usr/local/lib/php/extensions/[replace-wthi-your-extention-directory]/xmlrpc.so
in my case, it was:
extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/mysqli.so extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/pdo_mysql.so extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/sockets.so extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/pdo.so extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/mcrypt.so extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xmlrpc.so