U
U
Us592020-08-18 15:17:59
ubuntu
Us59, 2020-08-18 15:17:59

How to install php_pdo_mysql?

Enabled in php.ini
extension=php_pdo_mysql.so

Now I get an error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_pdo_mysql.so' - /usr/lib/php/20131226/php_pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0


I checked for the existence of the file - it simply does not exist.

Q: How do I fix this/install missing files?

Per command: apt-get install pdo-mysql
Issues:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pdo-mysql

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2020-08-18
@Rsa97

apt-install php-pdo-mysql
well
apt search php | grep pdo | grep mysql
, or look at what packages are there.

A
AUser0, 2020-08-18
@AUser0

PDO support is in the php-mysql module itself, so it is done through the commands:

sudo apt-get install php-mysql
sudo phpenmod pdo_mysql
sudo service apache2 restart

The last command is provided that you have PHP running under Apache.
Or you can just restart the server without understanding what it is running under...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question