I have been trying to use php in an Nginx server. I can't use Apache2 server. It's already in production. I have installed all the necessary requirements to run the duplicator (for Wordpress backup installation). But, it kept saying,
Support for the PHP mysqli extension is required. Please contact your hosting provider or server administrator to enable the mysqli extension. The detection for this call uses the function_exists('mysqli_connect') call.
Stack configuration:
- Php: 7.2
- Ubuntu: 18.04 L
- Mysql: 5.7.32-0ubuntu0.18.04.1
- Nginx: 1.14.0 (Ubuntu)
When I run sudo apt insall php-mysql, the result is
php-mysql is already the newest version (1:7.2+60ubuntu1).
Result of php -m | grep mysqli
PHP Warning: PHP Startup: Unable to load dynamic library 'mysqlnd.so' (tried: /usr/lib/php/20170718/mysqlnd.so (/usr/lib/php/20170718/mysqlnd.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/mysqlnd.so.so (/usr/lib/php/20170718/mysqlnd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib/php/20170718/mysqli.so (/usr/lib/php/20170718/mysqli.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/mysqli.so.so (/usr/lib/php/20170718/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20170718/pdo_mysql.so (/usr/lib/php/20170718/pdo_mysql.so: undefined symbol: mysqlnd_allocator), /usr/lib/php/20170718/pdo_mysql.so.so (/usr/lib/php/20170718/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
And finally since I am using php-fpm, snippets from php.ini file is
extension=mysqli <<< Current Configuration
;extension=/etc/php/7.2/mods-available/mysqli.ini <<< Tried this
;extension=mysqli.so <<< Tried This
Edit 1
Information from php info()
PHP Version 7.2.24-0ubuntu0.18.04.7
/etc/php/7.2/fpm/conf.d/20-mysqli.ini,
/etc/php/7.2/fpm/conf.d/20-pdo_mysql.ini,