I've tried everything - PHP DPO Driver could not be found

What issue or error are you experiencing?

When I connect to a new site in WP local, I cannot PHP PDO to work. Every time I try to use PDO, I get back “driver could not be found”. I’m using code that I pulled straight from my live site, where it works perfectly.

I pulled phpinfo() and found the php.ini file that this configuration was using, and then located that - I ensured that there were no semicolons before any of my extension names. I saved, and then restarted Local entirely. I looked into the extensions directory that I found in my version of php.ini and found all of the PDO DLL’s in the php extensions directory as well.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

PHP version 8.2.27
MySQL version 8.0.35
All I’ve done is spun up a new Local WP site and placed existing code from my live site into the public folder. Then ensured that extensions were being activated in my php.ini. and confirmed that the DLLs existed within the PHP extensions directory.


System Details

  • Local Version: Version 9.2.5+6810

  • Operating System (OS) and OS version: Windows 10


Local Logs

Unfortunately I read through my local logs and it’s all from my other local sites, I can’t find anything logging information about this error here.


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hey @austinl!

Is your Windows 10 using a 32-bit version?

What PHP version is the live site on?

I know we’ve had some issues with this in the past because it wasn’t compiled across all PHP versions and all OSes, but I would think it should work for Windows 10 and PHP 8.2 :thinking_face:

Hey Nick!
Thanks for taking a look at this. My windows 10 is 64-bit, and the live site uses PHP 8.1, and has used PHP 7.3 & 7.4 in the past.

Can you try dropping your PHP version and see if that has any impact?

Yessir - no changes unfortunately. Your suggestion also made me wonder if changing the server type would make a difference - no changes with that either.

Each time I’m making these changes, I’m shutting down the server, closing Local, and then reopening it and restarting the server to ensure that this might have some sort of an effect - still no luck.

Could you share a screenshot of what error you’re seeing and where @austinl ?

We’d also still love to get your Local Logs as we might be able to spot something in there. Specifically the verbose logs which give us a bit more diagnostic info. There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that you can drag and drop here.

@Nick-B - is there a way to privately share the Local Logs? I can’t identify anything compromising within the logs as I’m looking through them, but I’d be more comfortable sharing them directly if that’s a possibility.

Sure thing @austinl! Sending you a DM here.