top of page
Search
maloriestrauhal448

Pdoexception Could Not Find Driver: Cele mai bune practici și sfaturi pentru a evita această problem



PHP Fatal error: Uncaught PDOException: could not find driver in /home/abdullah/Documents/projects/cs50_radio/public/test.php:5 Stack trace: #0 /home/abdullah/Documents/projects/cs50_radio/public/test.php(5): PDO->__construct('mysql:host=127....')


As you can see above, the modules are installed on a file path not known or guided by common library path: /usr/lib/php5/20090626/. For your installation, it may be different, but only the path of pdo_mysql.so, pdo.so, mysqli.so. So, this is why Drupal or any other php engine couldn't find the library and shows that error: PDOException: could not find driver




Pdoexception Could Not Find Driver




The website encountered an unexpected error. Please try again later.PDOException: could not find driver in Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (line 79 of /var/www/testsite/web/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php).


Craft CMS 3 - I have used the CLI ./craft setup script to set the database connection on my local machine. I setup a MySQL connection, but when it attempts to validate my credentials, I get "failed: could not find driver". However, when I make a direct MySQL CLI connection using the same credentials, it works just fine. Why can Craft CMS not connect to my local database?


Fatal error: Uncaught PDOException: could not find driver in /home/xxxxxxxxxxxxxxxxxx:28 Stack trace: #0 /home/xxxxxxxxxxxxxxxxxx(28): PDO->__construct('odbc:DRIVER={Mi...') #1 /home/xxxxxxxxxxxxxxxxxx(19): include('/home/vol8_7/ep...') #2 main thrown in /home/xxxxxxxxxxxxxxxxxx on line 28


I created a postgres database on Fly.io and I was able to connect to it using the proxy command to connect to it. Using Laravel, I was also able to run my migrations from my local machine while connected to the proxy. I also was able to attach the database to my app. All is good. However, when I deploy my app and I try to connect to the database I get a PDOException could not find driver error.


When trying to go through the command line install prompts I keep getting 'could not find driver (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations)'. How do I fix this? 2ff7e9595c


1 view0 comments

Recent Posts

See All

Comments


bottom of page