Create a file called phpinfo.php in public and put the following inside it
<?php
phpinfo();
Now call it in a browser and search for PDO. Can you find it?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i install unbutu 18.04 when i try to php artisan migrate then error like
Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = pg_management and table_name = migrations)
at /opt/lampp/htdocs/pg_final/pgmanagment/vendor/laravel/framework/src/Illuminate/Database/Connection.ph p:665
661| // If an exception occurs when attempting to run a query, we'll format the error
662| // message to include the bindings with SQL, which will make this exception a
663| // lot more helpful to the developer instead of just the database's errors.
664| catch (Exception $e) {
> 665| throw new QueryException(
666| $query, $this->prepareBindings($bindings), $e
667| );
668| }
669|
Exception trace:
1 PDOException::("could not find driver") /opt/lampp/htdocs/pg_final/pgmanagment/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=pg_management", "root", "", []) /opt/lampp/htdocs/pg_final/pgmanagment/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
Please use the argument -v to see more details.
i also change in php.ini file
extension=php_pdo_mysql.dll add extension=pdo_mysql.so
after restart apache
but same error please help me out
Try running this from the terminal first
sudo apt-get install php7.3-mysql
Please or to participate in this conversation.