I have determined path to php but I’m getting the following php error in Ubuntu 22.04, I think I would need to load the Mysqlnd and mysqli for this issue
root@xxxx:~# php --ini
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo_mysql.dll' (tried: /usr/lib/php/20190902/php_pdo_mysql.dll (/usr/lib/php/20190902/php_pdo_mysql.dll: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/php_pdo_mysql.dll.so (/usr/lib/php/20190902/php_pdo_mysql.dll.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/20190902/pdo_mysql.so (/usr/lib/php/20190902/pdo_mysql.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/pdo_mysql.so.so (/usr/lib/php/20190902/pdo_mysql.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 'php_pdo_mysql.so' (tried: /usr/lib/php/20190902/php_pdo_mysql.so (/usr/lib/php/20190902/php_pdo_mysql.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/php_pdo_mysql.so.so (/usr/lib/php/20190902/php_pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /etc/php/7.4/cli
Loaded Configuration File: /etc/php/7.4/cli/php.ini
Scan for additional .ini files in: /etc/php/7.4/cli/conf.d
Additional .ini files parsed: /etc/php/7.4/cli/conf.d/10-opcache.ini,
/etc/php/7.4/cli/conf.d/10-pdo.ini,
/etc/php/7.4/cli/conf.d/20-calendar.ini,
/etc/php/7.4/cli/conf.d/20-ctype.ini,
/etc/php/7.4/cli/conf.d/20-exif.ini,
/etc/php/7.4/cli/conf.d/20-ffi.ini,
/etc/php/7.4/cli/conf.d/20-fileinfo.ini,
/etc/php/7.4/cli/conf.d/20-ftp.ini,
/etc/php/7.4/cli/conf.d/20-gettext.ini,
/etc/php/7.4/cli/conf.d/20-iconv.ini,
/etc/php/7.4/cli/conf.d/20-json.ini,
/etc/php/7.4/cli/conf.d/20-phar.ini,
/etc/php/7.4/cli/conf.d/20-posix.ini,
/etc/php/7.4/cli/conf.d/20-readline.ini,
/etc/php/7.4/cli/conf.d/20-shmop.ini,
/etc/php/7.4/cli/conf.d/20-sockets.ini,
/etc/php/7.4/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.4/cli/conf.d/20-sysvsem.ini,
/etc/php/7.4/cli/conf.d/20-sysvshm.ini,
/etc/php/7.4/cli/conf.d/20-tokenizer.ini
I don’t know what the exact steps is needed to follow. Kindly advise to load the Mysqlnd and mysqli
2
Answers
I've commented the following extenstion in this path /etc/php/7.4/cli/php.ini and issue got resolved.
I think you edited php ini the wrong way, or downloaded wrong PHP version as
dll
files are from windows, linux usesso
So smth like:
is what you are searching for.
Download proper extensions (if missing), put them into the folder, add path
in php.ini. More details (from my php.ini):
Also, to get the proper location for php.ini, use
php --ini