PDOException "Driver not found" in php
P粉478445671
P粉478445671 2023-08-29 14:04:38
0
2
457

I have installed Lampp on my linux system and I am learning symfony2 while trying to create schema using symfony2 command

php app/console doctrine:schema:create

I received the following error message: -

PDOException “could not find driver”

I also uncommented the line extension=php_pdo_mysql.dll

in the php.ini file

I tried finding and searching for my problem but I couldn't solve my problem. When I run the php -m command I get the following result: -

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626 lfs/mysql.so' - /usr/lib/php5 /20090626 lfs/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626 lfs/mysqli.so' - /usr/lib/php5/20090626 lfs/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626 lfs/pdo_mysql.so' - /usr/lib/php5/20090626 lfs/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 [PHP Modules] bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv json libxml mbstring mhash openssl pcntl pcre PDO ---- ----

Is there any way to eliminate this problem?

P粉478445671
P粉478445671

reply all (2)
P粉788571316

In Ubuntu, write

in the console
sudo apt-get install php5-gd php5-mysql

It will work

    P粉203792468

    Hopefully you are running your project in localhost. There is a file named parameters.ini in your project folder app/config, make sure your Mysql database connection is configured correctly. If you use mysql, seedatabase_driver=pdo_mysqlis the driver for it.

    Below is an example.

    database_driver = pdo_mysql database_host = localhost database_port = database_name = databasename database_user = msqlusername database_password = mysqlpassword//if not make blank mailer_transport = smtp mailer_host = localhost mailer_user = mailer_password = locale = en secret = ThisTokenIsNotSoSecretChangeIt

    hope it helps you.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!