macOS and M3 machine; 502 error if using <= PHP 8.0

On an M3 machine, if I try to use >= PHP 8.0, I get 502/Bad Gateway errors upon starting any site

My version and system details are:

  • Local Version 9.0.3+6684
  • MacBook Pro, 16-inch, November 2023 Ed. running macOS Sonoma 14.3

What setup are you trying to do for your custom configuration? What PHP, server and database?

Oh, my mistake for not using the template and outlining all that.

  • Server: nginx
  • PHP Version: 8.1.29
  • Database: MYSQL 8.0.16

If I’m on PHP version 7.4.30, things work fine, but anything that’s 8.0.0 or newer gets me the 502 error. However, I need to solve it because the staging and production cloud environments use a flavor of PHP 8, and the difference is messing us up.

Hi @eurocarfanatic

I just tried replicating this on my Mac M3 but no such luck.

In order to refresh here and start with a clean slate could you give the below troubleshooting steps a try?

  • Export any sites that you have on Local and save them to a folder somewhere on your computer: Backup a Local Site - Local

  • Fully uninstall Local from your computer: Uninstall Local - Local

  • Install the latest version of Local on this link: Releases - Local

  • Once installed, please restart the computer.

  • When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).

  • Check and see if the issue still persists. If so, please provide us with an updated log: Retrieve Local’s Log File - Local