I've just upgraded PHP5.6 to PHP7 on my XAMPP on Windows 10 following this guide. It works just fine, except for PDO.
In my phpinfo() I get PDO support enabled, PDO drivers no value
.
I copied the php.ini-development and renamed it to php.ini, and I have uncommented the extension folder declaration, and the extention driver php_pdo_mysql.dll.
extension_dir = "ext"
...
extension=php_pdo_mysql.dll
I have verified that php_pdo_mysql.dll is located in C:\xampp\php\ext and when I run php -m
in a console, both PDO and pdo_mysql are listed as active modules.
C:\xampp\php>php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
filter
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mysqlnd
openssl
pcre
PDO
pdo_mysql
Phar
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
When I run a script that utilizes PDO, I get thrown
Fatal error: Uncaught PDOException: could not find driver in (path to script)
The script I am running is completely valid and worked fine before the upgrade (basically just a new PDO(params)
).
What am I missing?