Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GlennMuylst's avatar

PDO drivers "missing" - WampServer 2.5 - Windows 8.1

We are trying to make Laravel work on Localhost on the Windows 8.1 OS, using WampServer 2.5 as our server and with php7.0.25 installed on it.

We have been able to install composer and use this to install the Laravel framework in directory wamp/www/blog. We also created an empty database (named blog) where the Laravel database can be migrated to. Sadly we get the error that the pdo drivers cannot be found:

[Illuminate\Database\QueryException]
could not find driver (SQL: select * from information_schema.tables where table_schema = blog and table_name = mig

rations)

[PDOException]
could not find driver

We have been doing some research and found multiple threads about this so we did all the necessary checks: the correct .ini file gets called for, all the drivers are available in the extension directory and all extensions are called for. Reinstalling the php version has also been tried, but with no luck.

By using the command php -i we can see the following:

PDO

PDO support => enabled
PDO drivers =>

I understand this might signify the drivers still cannot be found.

Is there any other solution for us to solve this problem so we can move on and start delving deeper into Laravel?

Thanks in advance.

0 likes
12 replies
mcangueiro's avatar

You have PDO support but no drivers enabled.

For instance, in my installation I have the following:

PDO drivers => mysql, sqlite

Do you have a version of php installed globally? Also, if you type php --ini you can see exactly the ini files that are being loaded. Make sure that it is calling the correct ones.

One example of a working one with Laragon:

Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\Laragon\bin\php\php-7.1.7-Win32-VC14-x64\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)
GlennMuylst's avatar

Is there any way to actually enable these drivers then? Besides adding the correct php version to WAMPserver, there are no further instructions on what to change.

mcangueiro's avatar

I personally don't have experience using Wamp, but I believe they provide an easy way to add those drivers by just using the tray icon and enabling the extensions you need there.

GlennMuylst's avatar

Yes, for sure. You are able to just edit the actual .ini file to enable the extensions or by just selecting them from the UI in the tray icon. All of those things are certainly in order. The actual .dll files are also in the correct directory.

I have also checked if the correct .ini file gets referenced with the command php --ini and also that seems to be correct.

After looking through all of the other solutions suggested in older threads or random google finds, I have no other option available for me sadly.

Thank you for trying to help us out.

RamjithAp's avatar

Click on wamp icon on right bottom of your screen-> navigate to PHP - > then PHP Extensions -> then select php_pdo_mysql & php+pdo_sqlite. Then restart all services.

GlennMuylst's avatar

Already did that RamjithAp.

λ php --ini Configuration File (php.ini) Path: C:\windows Loaded Configuration File: C:\wamp\bin\php\php7.0.25\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)

I'll copy the extension part over from that particular .ini file:

extension=php_bz2.dll extension=php_com_dotnet.dll extension=php_curl.dll extension=php_enchant.dll extension=php_exif.dll extension=php_fileinfo.dll ;extension=php_ftp.dll extension=php_gd2.dll extension=php_gettext.dll extension=php_gmp.dll ;extension=php_intl.dll extension=php_imap.dll ;extension=php_interbase.dll extension=php_ldap.dll extension=php_mbstring.dll ;extension=php_exif.dll ; Must be after mbstring as it depends on it extension=php_mysqli.dll ;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client extension=php_odbc.dll extension=php_opcache.dll extension=php_openssl.dll ;extension=php_pdo_firebird.dll extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll ;extension=php_pdo_odbc.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_phpdbg_webhelper.dll ;extension=php_shmop.dll extension=php_sysvshm.dll

mcangueiro's avatar

Just for a sanity check. What is the value of extensions_dir in you php.ini file?

GlennMuylst's avatar

I have tried the following three things and none of them worked

; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "C:/wamp/bin/php/php7.0.25/ext" ; On windows: extension_dir = "C:/wamp/bin/php/php7.0.25/ext/"

; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "C:/wamp/bin/php/php7.0.25/ext" ; On windows: extension_dir = "C:/wamp/bin/php/php7.0.25/ext"

; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "C:/wamp/bin/php/php7.0.25/ext" ; On windows: extension_dir = "ext"

mcangueiro's avatar

Your lines are all commented out. See this example:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
; extension_dir = "ext"
extension_dir =  "C:/wamp/bin/php/php7.0.25/ext"

Try that and reload the server to see if that fixes it.

GlennMuylst's avatar

Sorry, I seem to be having some issues with making the code markup work in my replies. All lines in my previous post are on different lines so the final extension_dir = "C:/wamp/bin/php/php7.0.25/ext/" would be on a different line underneath ;On Windows:

In any case, I have copied your example and it doesn't seem to solve the problem.

mcangueiro's avatar

I'm really out of ideas here, then. Sorry about that.

GlennMuylst's avatar

That's quite alright. Thanks for taking your time looking into it.

Please or to participate in this conversation.