ryan
ryan

Reputation: 11

pdo drivers no value in linux

I have install sudo apt-get install php7.0-mysql and i did sudo phpenmod pdo_mysql.

Command php -r 'phpinfo();' | grep -i pdo:

enter image description here

Command dpkg -l php*mysql:

enter image description here

And my pdo in phpinfo():

enter image description here I treid uncomment extension:pdo_mysql in php.ini without success.

Upvotes: 1

Views: 4588

Answers (2)

caner
caner

Reputation: 575

I had more than one versions of php installed on my system. In my case my apache was using another version of php. make sure your apache uses the right version of php (you can check current version on top of the phpinfo page).

If you want to change the php version that apache uses, write those lines to the command line.

a2dismod php8.1

a2enmod php8.2

systemctl restart apache2

Upvotes: 0

Rohit Sonawane
Rohit Sonawane

Reputation: 31

for the same issue on php 8.0

use command sudo apt-get install php-mysql

and restart xampp

here I got pdo_mysql

Upvotes: 3

Related Questions