Php issue site name in red

Issue Summary

I have a student who is trying to set up Local. She got permissions set now but when she tries to start a new site, if she sets it to php 7.3.5 she gets a critical error but if she sets it to 7.4.1 her site name turns red with a red exclamation point in a circle next to it. She is unable to get a new site running.

Troubleshooting Questions

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser? No

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!


286406732_10161867455374447_5933230681931588329_n

System Details

  • Which version of Local is being used? 6.4.0

  • What Operating System (OS) and OS version is being used? Windows 11

    • For example: macOS Catalina or Windows 10 Professional
  • Attach the Local Log. See this Help Doc for instructions on how to do so:

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.

Hello there, Shannon! :wave: Welcome to the Local Community!

If you hover over that ! icon does this reveal anything?

Let’s start there!

:woman_technologist:t3: Sam

Hi Sam,

Thanks for your response! This is one of our WordPress students (from GeekPack®) so I’m passed along the question. I have gotten some things to try from Flywheel, as well. It looks like her Local is under one user name and the actual sites are being installed to a different directory, so I’m having her look at that, as well. I’ll post as soon as I have an answer from her. If she can get Local to work, she is considering using Flywheel for hosting, so I definitely want to get her setup so she can continue with the course and host with Flywheel. Thanks!

Shannon

2 Likes

Hi Shannon,

Sounds great - we appreciate you!

We’ll be standing by. :smile:

:woman_technologist:t3: Sam

Thanks Sam! So, I thought that the issue might be that it looked like she had the Local app installed on one directory but the Local Sites folder for the sites she was creating was on a different directory.

I thought she might try uninstalling Local and setting it up so that everything was on one directory. Now she can’t get Local to install at all. Someone from Flywheel had suggested this:

When trying to install Local, did you make sure to run it set as Administrator? (Right-click → Run asAdministrator). Local usually asks for this by default however, if it does not have the correct permissions to create a directory,Local` might be running with administrator permissions.

She tried that and still can’t get Local to install. She gets this error.

Screenshot install error 160622 (1).jpg

local-logs1.zip (12.7 KB)

One other thing, she said it didn’t give her any information when she hovered over or clicked on the red exclamation point when she was able too add a new site.

Shannon

1 Like

Hi there, Shannon! :wave:

Has she tried deleting all Local & related JSON files?

Another option is to try to install the latest Beta version which can be found here:

We’ll figure this out!

:woman_technologist:t3: Sam

Hi there,

I would recommend making a backup / export before proceeding (as a general rule of thumb).

Here’s how to create a Backup in Local:

:woman_technologist:t3: Sam

She said that she uninstalled it, but I’ll have her make sure that it removed all files, including JSON files.

And I’ll have her try the beta, to see if that will work.

We’re trying to get all of our students using Local and Flywheel, if possible, so I also told her we would figure this out!

Thanks for your help,

Shannon

Hi Shannon -

As I mentioned, she may want to make a backup of those files, just in case it’s needed!

:woman_technologist:t3: Sam

I gotcha, she literally hasn’t even been able to start a site yet, so she doesn’t have anything to back up. But we do encourage regular backups of anything they are working on, so I’ll be sure she knows.

1 Like

Hey everyone, sorry for the hassle with this, and thanks for all the debugging info @shanwynn !

In general, when a site in the sites list is red, that means that there was an error during the provisioning step – basically the various server processes couldn’t be compiled or started. I know that’s pretty vague, but there could be lots of reasons for a site to not provision.

Permissions issues are a common source of this problem, and you mention that the student fixed the permissions, but can you elaborate on what exactly was done?

When I look at the Local log (the local-lightning.log within the zip file that was uploaded) I’m seeing a number of lines that relate to issues with provisioning the site. The errors seem to fall into two general categories:

Problem 1. Two Windows user profiles?

It seems like there are two user profiles being used, MegW and willi. From the Log file, it seems like Local is still trying to reference resources between those two profiles. For example, note how this line is trying to copy a file from willi's folder to MegW's folder:

{"thread":"main","class":"WordPressInstaller","stack":"Error: EBUSY: resource busy or locked, rename 'C:\\Users\\willi\\AppData\\Local\\Temp\\IUBsNs4PCupgrade.php.tmp' -> 'C:\\Users\\MegW\\LocalSites\\sheltertas2022\\app\\public\\wp-admin\\includes\\upgrade.php'","level":"error","message":"Error installing WordPress","timestamp":"2022-06-10T04:57:36.281Z"}
{"thread":"main","reason":{"errno":-4082,"code":"EBUSY","syscall":"rename","path":"C:\\Users\\willi\\AppData\\Local\\Temp\\IUBsNs4PCupgrade.php.tmp","dest":"C:\\Users\\MegW\\LocalSites\\sheltertas2022\\app\\public\\wp-admin\\includes\\upgrade.php"},"p":{},"eventId":"c1f2df0b9a404915971fbef80c03920c","level":"warn","message":"Unhandled Rejection.","timestamp":"2022-06-10T04:59:11.210Z"}

You mention that some of the fixes involved consolidating the folders, as well as installing as an administrator. Local probably shouldn’t be installed as and Admin, it just needs to occasionally get admin privileges. I’d start by completely uninstalling Local, both as a regular user, as well as an administrator. For detailed info about the kinds of things to delete, take a look at this help doc:

From there, delete any of the temporary files that Local is using (or even just delete the temp folder) for the user willi. From the above error lines, it looks like that location is at:

C:\\Users\\willi\\AppData\\Local\\Temp

Problem 2. Local can’t reach things on the internet

There are a couple of errors related to Local not being able to reach remote sites like wordpress.org and cdn.localwp.com. The specific error lines look like:

{"thread":"main","reason":{"errno":-3008,"code":"ENOTFOUND","syscall":"getaddrinfo","hostname":"cdn.localwp.com"},"p":{},"eventId":"08bfc752602c422f91d90fcba3184374","level":"warn","message":"Unhandled Rejection.","timestamp":"2022-06-10T13:51:19.483Z"}

and

{"thread":"main","class":"WordPressInstaller","message":"Could not fetch latest WordPress version.request to https://api.wordpress.org/core/version-check/1.7/ failed, reason: getaddrinfo ENOTFOUND api.wordpress.org","type":"system","errno":"ENOTFOUND","code":"ENOTFOUND","level":"error","stack":"FetchError: request to https://api.wordpress.org/core/version-check/1.7/ failed, reason: getaddrinfo ENOTFOUND api.wordpress.org\n    at ClientRequest.<anonymous> (%%appPath%%\\node_modules\\node-fetch\\lib\\index.js:1461:11)\n    at ClientRequest.emit (events.js:315:20)\n    at TLSSocket.socketErrorListener (_http_client.js:469:9)\n    at TLSSocket.emit (events.js:315:20)\n    at emitErrorNT (internal/streams/destroy.js:106:8)\n    at emitErrorCloseNT (internal/streams/destroy.js:74:3)\n    at processTicksAndRejections (internal/process/task_queues.js:80:21)","timestamp":"2022-06-10T15:11:23.583Z"}

When Local can’t reach the cdn.localwp.com site, it is unable to download additional services like different versions of PHP. That’s likely part of why changing to different versions of PHP was causing issues with provisioning a site.

As for the wordpress.org domain – if Local can’t reach that domain, then it can’t get the files to create a WordPress site.

The reason that I lump these two issues together is that it seems like something is preventing Local from reaching the internet. Common reasons for this are:

  • Antivirus settings. Are there any security settings in place that are preventing access to certain domains?
  • Wifi security. Are there any security settings in place on the wifi router, or LAN that the user is connecting to?
  • VPN. Similar to Wifi issues, is the user using a VPN to connect to the net? Maybe there are some issues with the VPN that are preventing Local from accessing those sites.

I hope that gives you some areas to investigate. As a big test, you might try creating a new Windows user and installing Local from scratch after investigating the various settings. Let us know what you find while investigating those things, along with whatever was done to get things up and running.

Hi Ben,

Thanks so much for taking a look and providing information on the errors. I told her that having Local on one user directory and her Local sites on another was likely at least part of the problem. She uninstalled and attempted to install on the other user profile and now Local won’t install at all.

Here is a more recent Local-log and the error she is getting.

local-logs1.zip (12.7 KB)

Screenshot install error 160622 (1).jpg

@ben.turner , thank you so much for your help! The issue has been resolved and she is happily using Local. The only thing she has left to figure out is why she has to turn her anti-virus software every time she uses Local.

2 Likes

Hi @sambrockway Thanks SO much on your help with this! The issues have been resolved and she is diving into Local!

1 Like

Hi @shanwynn - fabulous news! :tada:

Sam :woman_technologist:t3:

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