Sometimes there are two different PHP versions installed on a machine, one for CLI and one for the web server.
Check your phpinfo what php.ini is being used and also run php --ini in your CLI and check if it's the same.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I was in need to install Php 5.6 with postgres. I followed the instructions from here and did:
brew install php56 --without-mysql --without-apache --with-postgresql
brew install php56-pdo-pgsql
Php 5.6 and postgres are running fine with my Projects using PostgreSQL.
Now there is some problem with Laravel projects using mysql. On running php artisan migrate command, it shows:
[PDOException]
could not find driver
Project works fine in the browser though. Data is being fetched perfectly from the mysql tables. php -m also does not shows mysql. But phpinfo does shows mysql module.
What could be the problem? Do i need to reinstall mysql?
Please or to participate in this conversation.