Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: major incompatibility with php 8.2 #214

Open
NicktheGeek opened this issue Apr 26, 2024 · 6 comments
Open

Bug: major incompatibility with php 8.2 #214

NicktheGeek opened this issue Apr 26, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@NicktheGeek
Copy link

I'm still working to understand exactly what happened here so I'll add as much detail as possible in the hope that maybe someone knows some part of the code that could have triggered this.

A few weeks ago we started using this plugin on a client site and also updated to PHP 8.2. There were some warnings thrown but otherwise everything worked in our testing and continued to work for a few weeks.

Then 2 days ago the site went down. Some pages would partially load and other pages failed to load at all. For example, the login page threw a 502 error.

The debug logs did not shed any light on the issue. NGINX showed that PHP was exiting prematurely with an error but the PHP logs didn't record the error.

The only thing I could do to diagnose was log in via SFTP to try and figure out where it was halting. Eventually I renamed the plugins directory and the site was loading better though some functions no longer existed but at least that provided errors that were not found previously.

I restored the directory name and everything broke again.

So I went through each plugin renaming the directory until the font-awesome plugin. As soon as I renamed it, the entire site was back up except icons didn't work because the plugin wasn't loading.

Again, this worked in PHP 8.2 for weeks, but something triggered an error state in such a way that PHP failed before it could record the error.

The only other bit of diagnostic info I have so far is that there was a sister site we still had on PHP 8.0 because some issues with the login had to be resolved before updating. The code is mostly the same including this plugin. It never had an issue so I reactivated the font awesome plugin after rolling back the site that broke to PHP 8.0 and everything is working perfectly again.

So there appears to be some code that is triggered intermittently that breaks in such a way in PHP 8.2 that I could not get any debug info.

I hope this might trigger some idea because I'm at a loss currently.

@robmadole
Copy link
Member

Thanks, @NicktheGeek. That's surprising. The part that gets me is that it worked for weeks. That seems to point me toward some state issue (data in the database).

I don't even know how we go about trying to reproduce this...

I think the best thing we can do is leave this issue open and maybe someone else runs into it and we can gather more information.

@robmadole robmadole added the bug Something isn't working label May 6, 2024
@JeremyShapiro
Copy link

Yeah, we experienced the exact same issue... Site started generating 502 gateway errors out of nowhere. Nothing had changed. Disabling just the font awesome plugin immediately fixed it. Re-enabling the plugin immediately brought back the gateway errors.

PHP 8.2
WP 6.5.3
FA 4.4.0

@EricTendian
Copy link

There's an open PHP issue that is likely related: php/php-src#13817

I'm not sure what in this plugin causes the issue, but it seems like a fix is being developed per the latest comments. It would be good to validate that possible fix against a site with this plugin enabled.

@robmadole
Copy link
Member

Has anyone tried 8.2.19? That was released on May 9th.

@mlwilkerson
Copy link
Member

I went to try and reproduce this using the wordpress:6-php8.2 docker image. The container says it's using PHP 8.2.8 with WordPress 6.5.3.

It's a clean and simple dev environment setup with nothing fancy. Everything seems to working as expected, based on some basic page loading usage, and running all of the PHPUnit tests.

If there's any more specific known combination of server configuration or usage that's known to trigger the error, I could try again to reproduce it.

@scottbuscemi
Copy link

@mlwilkerson Reproducing requires something to use the Observability API of PHP (php/php-src#13817). Installing and activating New Relic on your server should repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants