1
I’m trying to put a Wordpress site in Xampp (localhost) but when running it appears the following error:
My mistake: https://prnt.sc/gjytdc
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 global panel.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 on line 16
Already enable extension_pdo, extension_mysql from php.init, I’m using extension_pdo PHP 7.1.8 and I’ve already given phpinfo and it worked normally.
My phpinfo: https://prnt.sc/gjysdn https://prnt.sc/gjyt77
Note: My xampp is not installed Mysql because it is installed the part.
Which version of php do you use? looked at
phpinfo()
if mysql driver is included in the PDO part (it should be enabled)?– rray
I’m using the version of PHP 5.6 and yes I already gave phpinfo and it works normally.
– William
You could put the screenshot (in question) of the PDO part?
– rray
The module
pdo_mysql
is enabled? Probably onphp.ini
it will be necessary to uncomment the lineextension=php_pdo.dll
andextension=php_pdo_mysql.dll
– Filipe Moraes
yes the module is enabled.
– William
You are not using PHP 5.6 but 7.18 according to the image you have provided. There is this line
<IfModule php5_module>
in the filehttpd-xampp.conf
? If so, then trade forphp7
.– Filipe Moraes
It is true, but it is strange because it was pointing to the 5.6, but I believe that the following instructions are the same?
– William
You’re probably editing the
php.ini
wrong. What is the result ofphpinfo(INFO_GENERAL);
? Can you post the image? Try to put the image in Stackoverflow itself ( recommended ) because external servers may crash and the question loses that link, you set the migration from PHP 5 to 7?– Filipe Moraes
In my
httpd-xampp.conf
doesn’t have the<IfModule php5_module
( my archive: [https://prnt.sc/gjz0zz] | [https://prnt.sc/gjz169] | [https://prnt.sc/gjz1d1] and minephpinfo(INFO_GENERAL)
[https://prnt.sc/gjz1z3]– William
Are you changing the
php.ini
that’s in the folderC:\xamp\php\php.ini
as is in thephpinfo
? Apparently by the images there is nothing wrong. I believe the problem is in the configuration of Mysql. As it is a separate installation, the Mysql service is working?– Filipe Moraes
I am using a mysql already installed on the machine before Xampp.
– William
Let’s go continue this discussion in chat.
– William