"Uncaught PDOException: could not find driver" error in Wordpress on localhost

1

I'm trying to put a site in Wordpress in Xampp (localhost) but when I run it, the following error appears:

My error: link

  

Fatal error: Uncaught PDOException: could not find driver in   C: \ xampp \ htdocs \ phdvital \ public_html \ panel \ include \ PDO \ pdopaginator.inc.php: 16   Stack trace: # 0   C: \ xampp \ htdocs \ phdvital \ public_html \ panel \ include \ PDO \ pdopaginator.inc.php (16):   PDO- > __ construct ('mysql: host = loca ...', 'root', '1234', NULL) # 1   C: \ xampp \ htdocs \ phdvital \ public_html \ panel \ include \ class.connection.inc.php (30):   PDOPaginator- > __ construct ('mysql: host = loca ...', 'root', '1234') # 2   C: \ xampp \ htdocs \ phdvital \ public_html \ panel \ global.php (35):   connection-> connect () # 3   C: \ xampp \ htdocs \ phdvital \ public_html \ index.php (17):   require ('C: \ xampp \ htdocs ...') # 4 {main} thrown in   C: \ xampp \ htdocs \ phdvital \ public_html \ panel \ include \ PDO \ pdopaginator.inc.php   online 16

My phpinfo: link link

Note: My xampp is not installed because Mysql is installed separately.

    
asked by anonymous 11.09.2017 / 22:42

1 answer

4

Open php.ini ( not httpd-xampp.conf), the Xampp php.ini should be in a folder similar to this C:\xampp\php\php.ini , in windows native notepad maybe does not open correctly, can open by programs like SublimeText or Notepad ++.

After opening, find the lines that contain:

;extension=php_pdo.dll

and

;extension=php_pdo_mysql.dll

Take out ; and front, getting:

extension=php_pdo.dll

and

extension=php_pdo_mysql.dll

And then save the file by pressing Ctrl + S, then need to restart Apache (in this case you should do this in Xampp panel), press the Stop button and after it turns Start press again:

    
11.09.2017 / 23:23