According to this post, it isn’t really possible to use a custom version of PHP to run a Local instance. So if the version of PHP I want to use is compiled without PDO support, there’s nothing I can do, as a user, to fix that.
I tried the next PHP version available, and what do you know? I now have PDO support!
Is there any way we can make sure every version of PHP in Local is compiled with all of the common extensions? This is really important, in my opinion, because otherwise people who use one version over another might run into PHP errors due to an extension being missing. I would hate to find out this is a common issue with Local, as it makes it a headache to use, instead of being “[a]n effortless way to develop WordPress sites locally.”
I just noticed that the PHP version I was running Local with (PHP 8.0.22, the default PHP version at the moment) was compiled specifically without PDO support.
According to this post, it’s basically not possible for a user like me to use a custom version of PHP inside of Local. This means if PHP is compiled without an extension, there’s nothing I can do to fix that problem!
Hey, I just tried the next PHP version up (PHP 8.1.9), and guess what? PDO is not disabled explicitly in this version. Everything seems to work fine now.
Here’s the issue with this, and forgive me if this seems obvious: every version of PHP compiled in Local needs to have the same standard extensions. Otherwise users like me will run into problems like the above when switching PHP versions, and new users like me will especially be turned off to using Local. So far my experience hasn’t quite felt like, “[a]n effortless way to develop WordPress sites locally,” but I hope it’s getting there.
Thanks for all the hard work that’s gone into making Local!
Hey @GrowPlugins - thanks for the feedback! I’m glad you were able to get that sorted out. Correct, there isn’t a way for a user to specify or insert their own PHP version into Local.
Agreed, our goal is that all of those PHP versions should be compiled with the same default set of extensions. We’ll make sure PDO support is added on all versions going forward!