502 Bad Gateway with PHP 8.1.9

Bug Summary

When using PHP 8.1.9, site is not accessible and it gives 502 Bad Gateway error when visiting the site.

Steps to reproduce

  1. In the local setup, change PHP version to 8.1.9.
  2. Visit the site. It will throw above error

Environment Info

Describe your environment.
Operating System: MX Linux 19.3 x64 patito feo
PHP: 8.1.9
MySQL: 8.0.16
Local version: 6.7.0+6347

Supporting info

In the local-lightning.log, following error is logged

{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"%%resourcesPath%%/lightning-services/php-8.1.9+8/bin/linux/sbin/php-fpm: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.29’ not found (required by %%resourcesPath%%/lightning-services/php-8.1.9+8/bin/linux/shared-libs/libexslt.so.0)",“timestamp”:“2023-04-22T10:55:11.538Z”}`

Hi there @kishan.icegram - welcome to the Local community! :wave:

Are you able to upload your Local logs? You can do so by following this step-by-step guide:



Hi sam,

Thank you for your support and sorry for the delay from my end.

Here is the log requested

local-lightning-verbose.log (440.7 KB)
local-lightning.log (117.4 KB)

Thank you.

Are you still on Local 6.7 or have you tried updating to the latest?

Hi Nick,
I updated and tested with the latest version but the issue still persists. Here are the latest log if it helps.

Thank you.

local-lightning-verbose.log (1.0 MB)
local-lightning.log (550.6 KB)

To clarify does this only happen with PHP 8.1.9 or any PHP version?

Hi @kishan.icegram

Checking with the team, this actually might be related to your OS version. Are you able to update your Mint version to one based on Ubuntu 20.04?

Hi Nick,

My current system is MX Linux 19.4 which is based on Debian 10 buster. Currently, I am unable to update the system, but is there any other alternative like downgrading flywheel or something else to make it work?

You could try using a lower PHP version like 7.3 and see if that works. You could also try downgrading to an older Local version here:

Hi Nick,

With PHP 7.3, 7.4 it is working as expected. But I need to test my code with PHP 8.1 and higher.

Can you tell me which older local version will allow me to test with PHP 8.1?

Just to give some more information related to the issue, here is a screenshot of the error which I get when creating ne sites with PHP 8.0 and higher. And new site isn’t created after this error popup. Might be helpful in debugging the issue further.

Hi @kishan.icegram

To clarify there won’t be an older Local version that will allow you to work with PHP 8.1. No matter what version you use you’ll only be able to use PHP 7.4 on down unfortunately until you’re able to update your OS.