Ubuntu package, php7.x is missing MySQL PDO driver

What issue or error are you experiencing?

Using the deb installer 7.2.1+6433 on Ubuntu, all of the PHP 7.x builds (7.3.5 and 7.4.30) are missing any PDO Drivers. All PHP 8.x builds provide PDO drivers for both MySQL and sqlite.


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

Install the .deb package in linux and simply compare the phpinfo output (by clicking “Details” next to the PHP version of a Local site) and look at the PDO Support section.

8.1.23:

7.4.30:


System Details

  • Local Version: 7.2.1+6433

  • Operating System (OS) and OS version: Linux Mint 21 (Ubuntu based)


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

Not relevant to the issue.


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.

2 Likes

Hi @jar

This is actually expected functionality for this OS & PHP builds as the driver isn’t compiled across all versions. As PHP moves forward with 8.3 on the horizon getting anything added to versions below 8.0 is unlikely.

Is there a work stoppage for you on PHP 7.3/7.4 without this? Or what limitations/errors are you running into?

There are several plugins in our wpengine installs we’re attempting to test/develop with Local that utilize PDO:MySQL functionality. This functionality has always been present in our own environments and at WPEngine, so it wouldn’t occur to me to not be provided by any typical PHP installation. It is breaking in PHP7 versions when trying to test/develop in Local due to this missing feature. In many cases these sites are PHP8 ready and so we’re upgrading them where we can, but there are some sites that require changes more extensive than we can get to right this moment but would still like to be able to use Local to test these sites in php7.x for the purpose of ensuring MySQL compatibility, as WPEngine is pushing all sites to MySQL tonight and we’ve been sweeping through them all for that purpose for the past week.

Do you have any Mac or Windows machines you’d be able to utilize to get things checked before the upgrade? Even if we were to get something on the roadmap to get this added it would take some time to get added and definitely not in a day.

I do not, but in the meantime I’ve had to offload these things to other staff to do. I figured it may likely be the case that no fix would be found within a day or two, but I still saw it as something that obviously needs correcting because, unless I’m incorrect (which I could be) I was under the impression the stated intention is that people should be able to run wpengine sites in a local environment for development which behaves exactly like the production environment that the site comes from. In this case, it seems that the Local environment and the WPE environments differ in an important way. At least until PHP7 is no longer an option at WPE, it seems to be an important issue in my mind, but either way we’re going to have to work around it for now.

Thank you for the feedback and insight! Generally speaking, WPE and Local were separate entities for many many years before all finding themselves under one “roof”. We are constantly working to make them more compatible and have the absolute most value for both WPE customers as well as all of our regular Local users. For those reasons, not everything will always be 1:1 with hosting (yet). Lately, our priorities have mainly been around PHP 8 builds, which as you noted have what you require and will continue to moving forward. Getting these types of things added for older PHP versions and specific OSes may not be feasible but our work has been focused on ensuring that you don’t run into these kinds of problems in the future.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.