XF 2.1 Site crash after update

Movie Prop Sites

Active member
We just updated @Xon 's Signup abuse detection and blocking addon. As the update was running the site crashed with a 500 error. We have had this happen before for numerous add-ons. Usually you just refresh the page and the update continues. Today it didn't.

The entire site is down. We can't get to the admin panel or anything.

First we tried reuploading the files for the addon.

Next we tried disabling listeners through the config file

Next we rebuild through command line

Nothing has resolved the issue.

I know this seems like an app specific issue, but I don't think it is the app that is the problem, but something else has happened during the update.

Any help would be appreciated as we are in a down position and I really don't want to restore from backup if I don't have to.

Here are the errors we keep getting:


[Fri Jun 05 06:36:22.988422 2020] [php7:error] [pid 2371:tid 139799985882880] [client xxx] PHP Fatal error: Uncaught ErrorException: [E_WARNING] file_exists() expects parameter 1 to be a valid path, string given in /home/xxx/www/xxx.com/forums/src/XF/App.php:156\n

Stack trace:\n

#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] fil...', '/home/www_hosti...', 156, Array)\n

#1 /home/xxx/www/xxx.com/forums/src/XF/App.php(156): file_exists('/home/www_hosti...')\n

#2 /home/xxx/www/xxx.com/forums/src/XF/Container.php(28): XF\\App->XF\\{closure}(Object(XF\\Container))\n

#3 /home/xxx/www/xxx.com/forums/src/XF/App.php(1447): XF\\Container->offsetGet('config')\n

#4 /home/xxx/www/xxx.com/forums/src/XF/Container.php(28): XF\\App->XF\\{closure}(Object(XF\\Container))\n

#5 /home/xxx/www/xxx.com/forums/src/XF/App.php(2646): XF\\Container->offsetGet('extension')\n

#6 /home/xxx/www/xxx.com/forums/src/XF/App.php(2674): XF\\App->extension()\n

#7 /home/xxx/www/xxx.com/forums/src/XF/App.php(311): XF\\App->extendClass('XF\\\\InputFiltere...')\n

#8 /home/xxx/www/the in /home/xxx/www/xxx.com/forums/src/XF/App.php on line 156
 
Can you try running these CLI commands;
Code:
php cmd.php xf-rebuild
php cmd.php xf-addon:upgrade -f SV/SignupAbuseBlocking

This will rebuild core XF data and force the various caches to be rebuilt, and then re-import the add-on and recompile caches touched in the add-on install process.

What if you were to just delete the addon files out of the src directory, will that allow you to get back in?
This is exploding when the XF web request is touch XF/InputFilterer which none of my add-on's extend.
 
The error message mentioned doesn't make any sense to me. It's erroring when trying to read the config file and it's complaining about the file path itself. The file path mostly comes from the server itself. A bit of Googling seems to imply that the path may contain null characters, but that doesn't make any sense to me. I am very baffled as to why that might appear randomly, unless there has been some really strange server shenanigans (such that PHP is getting a file path from the server that contains a null character).
 
  • Like
Reactions: Xon
The error message mentioned doesn't make any sense to me. It's erroring when trying to read the config file and it's complaining about the file path itself. The file path mostly comes from the server itself. A bit of Googling seems to imply that the path may contain null characters, but that doesn't make any sense to me. I am very baffled as to why that might appear randomly, unless there has been some really strange server shenanigans (such that PHP is getting a file path from the server that contains a null character).

Thanks, @Mike. Asking our server admin now. My concern is that the site was up and running and everything seemed fine, and somehow (through seemingly no fault of Xon's) running an update for his add-on broke the site. We haven't changed anything else.

We don't see any DB errors. The tables don't seem to be corrupted.

I am open to ANY suggestions you have as we are still down and don't know anything else to try.
 
If you submit a ticket via your customer area with FTP (or similar) access details I can try to debug it. (Mention this thread in the ticket.)
 
  • Like
Reactions: Xon
After a bit of debugging, my best guess is PHP opcode cache corruption, as the result from __DIR__ (which XF uses to detect the source directory) had a null byte appended to it. The act of me debugging this had me changing the file and then the issue seemed to disappear.

No idea what would have triggered that, but as a general note if anyone else runs into something odd like this, restarting the web server/PHP-FPM (or clearing the opcache in some other way) could potentially fix something like this.
 
After a bit of debugging, my best guess is PHP opcode cache corruption, as the result from __DIR__ (which XF uses to detect the source directory) had a null byte appended to it. The act of me debugging this had me changing the file and then the issue seemed to disappear.

No idea what would have triggered that, but as a general note if anyone else runs into something odd like this, restarting the web server/PHP-FPM (or clearing the opcache in some other way) could potentially fix something like this.

Thanks for the help, Mike. Always anxiety-enducing when the site goes down and the known fixes don't fix the issue. I appreciate you getting it resolved so quickly.
 
Back
Top Bottom