Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
ExiledVip3r Posted March 23, 2023 Posted March 23, 2023 (edited) Been wanting to update my site for a while to the current version of IPB, however, whenever I switch to the required PHP 8.0 or above (I tried both 8.0 and 8.1) the site will work as typical for a bit but eventually will start giving error 500 on both the site and admin panel, this break happens immediately if I goto admin panel's support page and click clear the system cache. Switching back to PHP 7.4 fixes it right away. I've tried disabling all 3rd party apps and plugins and switching the default theme. The same result happens soon as I switch to PHP 8.0+ I'm using nginx webserver and Redis for system caching. The only output I got in the nginx error log after switching to php-fpm 8.0 for a few minutes just now is the 3 errors below. I'm unsure if they are related though, as I'd expect there to be a lot more errors as the site gets heavy traffic and should've logged a lot more errors in the few minutes it was down using php8.0. Quote 2023/03/22 20:47:47 [error] 722588#722588: *82123275 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot use "parent" when current class scope has no parent in /home/<snipped>/www/public/system/Theme/Theme.php(2703) : eval()'d code on line 37" while reading response header from upstream, client: <snipped>, server: www.<snipped>.com, request: "GET /files/category/203-<snipped>/page/46/?listResort=1&csrfKey=9425f6ca872103efc3e2c20e775fbe0e HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "www.<snipped>.com", referrer: "https://www.<snipped>.com/files/category/203-<snipped>/page/46/" 2023/03/22 20:47:49 [error] 722583#722583: *82129716 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot use "parent" when current class scope has no parent in /home/<snipped>/www/public/system/Theme/Theme.php(2703) : eval()'d code on line 37" while reading response header from upstream, client: <snipped>, server: www.<snipped>.com, request: "GET /admincp/?app=core&module=support&controller=support HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "www.<snipped>.com", referrer: "https://www.<snipped>.com/admincp/?app=core&module=overview&controller=dashboard" 2023/03/22 20:48:47 [error] 722580#722580: *82131013 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot use "parent" when current class scope has no parent in /home/<snipped>/www/public/system/Theme/Theme.php(2703) : eval()'d code on line 37" while reading response header from upstream, client: <snipped>, server: www.<snipped>.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "www.<snipped>.com", referrer: "https://www.google.com/" Any help would be much appreciated, I've tried pretty much everything I can think of but haven't been able to make much progress on figuring it out. Edited March 23, 2023 by ExiledVip3r
ExiledVip3r Posted March 23, 2023 Author Posted March 23, 2023 (edited) 30 minutes ago, balazsp said: What's your current version? v4.7.3, which is as far as I know the last version to support PHP 7.4. Haven't been able to upgrade past it since I can't get PHP 8.0+ working smoothly. Edited March 23, 2023 by ExiledVip3r
teraßyte Posted March 23, 2023 Posted March 23, 2023 One or more of your plugins is not updated to work with PHP 8. Do the following: Disable all your plugins/applications. Switch to PHP 8 and confirm the site works. Re-enable your modifications 1 by 1 and find out which one is making the site crash. Switch back to PHP 7.4 to get your site working and check if a new version of the modification is available for 4.7. If not, contact the author of the plugin causing the issue to see what they say.
balazsp Posted March 24, 2023 Posted March 24, 2023 Temprarily renaming the plugins folder helped me more than once to get back to the site. Sometimes even though an app/plugin was disabled, it still wrecked the site.
ExiledVip3r Posted March 24, 2023 Author Posted March 24, 2023 I figured it out, it was an incompatible "back to top" plugin. Disabling it and making sure the cache was cleared of any hooks and such from it were gone cleared up the site to work on PHP8.0. Previous attempts at disabling/enabling it must've left some data over somewhere leading me to incorrectly assume it wasn't the cause. Thanks.
ExiledVip3r Posted March 24, 2023 Author Posted March 24, 2023 While I'm here, another issue I've been having trouble tracking down lately is this error message popping up frequently in the system logs: I've been at a loss as to what could be causing it, but I've tried disabling the app the hook it's loading comes from, but the error still comes up frequently in the log, just without mentioning the loaded hook.
Marc Posted March 24, 2023 Posted March 24, 2023 Its very likely the hook that is showing loaded these at the bottom. Try disabling that first of all. Grafidea 1
Martin A. Posted March 26, 2023 Posted March 26, 2023 On 3/24/2023 at 9:11 AM, Marc Stridgen said: Its very likely the hook that is showing loaded these at the bottom. Try disabling that first of all. Did you read his post? Specifically where he wrote that he tried disabling the mentioned application? On 3/24/2023 at 1:40 AM, ExiledVip3r said: While I'm here, another issue I've been having trouble tracking down lately is this error message popping up frequently in the system logs: I've been at a loss as to what could be causing it, but I've tried disabling the app the hook it's loading comes from, but the error still comes up frequently in the log, just without mentioning the loaded hook. Upgrading to 4.7.8 or newer will most likely fix this for you, as one of the calls in the stack trace have been remove. It's related to storing the members current timezone in the database. ExiledVip3r and Stuart Silvester 1 1
Recommended Posts