Local Community

Uh-oh! Local ran into an error - site is broken

I see a few other reports of similar issues. I’m providing more info here in the hope of finding a resolution.

Running V6.4.2+6012 over Win10.

I created a new site with PHP 7.4.1, Apache, MySQL 8.

I need XDebug so I generated the VSCode launch.json. I use non-default php.ini.hbs settings so I moved them into the new file and restarted. Everything runs fine but there’s no connection on Xdebug. The INI has port 9003 set and VSCode is listening on 9003, but no connection.

Looking at the sote\logs\php\error.log, it says it can’t find one of my extensions in folder Local\lightning-services\php-7.4.1+18.

WAIT: I have folder 7.4.1+16. Was the config changed in the most recent 6.4 update without forcing a download of a new PHP version?

So I looked up this condition and found this FAQ from Support:

Rather than deleteing the +16 folder I renamed it to _old_name, and restarted Local. I went to the new site’s config page but now it’s always returning the “Uh oh!” error below … and the page closes when I close the dialog. (The dialog actually displays twice as it tries to display the page.)

Now I can’t get in to this site to set the PHP version.

I have restarted Local, with Administrator privs. I’ve renamed the PHP folder to +18. I’ve looked for a different version of PHP (but I would really prefer to use the final 7.4 rather than continuing to play with this 7.4.1 which I wouldn’t support in the field anyway.

Summary: The challenge is that this message prevents any changes to the configuration of this one site. I can easily copy the data into a new site. I’ll hold any changes to see if Support wants me to do something else for testing.

And then I need to get Xdebug running. What magic is now required for this common configuration? Until I hear from Support I’ll also test other sites to see if they’re still connecting to Xdebug, and I’ll try to reproduce the configs.

Thanks as always.

I think I see what happened here. When I did the most recent update today, it asked if I wanted to install for the current user or for all users. There was the suggestion that the installation was already in place for all users so that would be an update, but it did not show the current user installation, which would result in a new install. OK, I thought something had changed. So I selected the all-user install. I wasn’t thinking …

There was no all-user installation, only my current user. So it did a new installation with all files under C:/Program Files (x86)/Local … including … /resources/extraResources/lightning-services/php-7.4.1+18/bin/win64/ext
So there’s the +18.
And the new configs are looking for more +18 folders, which it’s not going to find in my existing sites.

OK, it looks like the challenge is to save off the data, uninstall Local entirely, including registry, removing all files from Program Files and the user/AppData tree, and then re-installing with the desired config.

I’m fine with doing that, recreating the sites and moving my data in. The structures make that very easy, where every database is the same, under LocalSites\name\app\sql which contains a recent local.sql dump, and then wp-config.php always refers to the ‘local’ database.

But time is consumed to recreate the sites in Local with the same Apache/MySQL/PHP configuration so that the data corresponds.

The alternative is to look for the config references to Program Files, and change those to user/AppData so that the existing files are found. Recreating the one bad site is not a problem.

So - before I blow a couple hours on this, does anyone have documentation for the easiest or best or most appropriate way to restore data from an existing installation of Local into a new one? Is there some magic “drop in the files and run this and it will all work?”

Better ideas?

Thanks!