PDO module missing?

SOLVED: See xabbu’s comment below. Many thanks to Xabbu.

I am running PHP locally on Manjaro 20. PHP runs (eg phpinfo runs fine). However my application won’t because there seems to be a problem with PDO. It was working just fine and I have not made any changes to the PHP configuration since I installed and configured PHP. It is possible that something has been changed by a recent update (how could I tell?).

The issue seems to be a missing ‘pdo’ module (see the output of php -v below). php -m shows that there is a ‘PDO’ module, but not a ‘pdo’ module. There is no pdp.so or PDO.so in /usr/lib/php/modules/.

Your suggestions would be most welcome.

Michael Barraclough

php -v

PHP Warning: PHP Startup: Unable to load dynamic library ‘pdo’ (tried: /usr/lib/php/modules/pdo (/usr/lib/php/modules/pdo: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo.so (/usr/lib/php/modules/pdo.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.13 (cli) (built: Nov 24 2020 16:22:20) ( NTS )

php -m

[PHP Modules]


php.ini (relevant lines)

extension_dir = “/usr/lib/php/modules/”


PDO support enabled
PDO drivers mysql
PDO Driver for MySQL enabled
Client API version mysqlnd 7.4.1

1 Like

The PDO module is build in PHP. It is not a module/extension that can be loaded. The PDO MySQL extension however is a shared extension, it needs to be explicitly loaded if you want to use it.

You need to remove this line

or put a ; in front.

No, there are no changes, but there is no extension=pdo line in the default php.ini file.

Worked. Thank you so much.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.