?
avatar PhilETaylor
PhilETaylor
15 Aug 2020

Steps to reproduce the issue

Joomla 4.0-dev

Correctly configure caching to a redis server. Reload any Joomla page - see it caches and no issues.

Turn off the redis server OR edit /configuration.php and change

public $redis_server_host = 'yourredisserver.com';
to
public $redis_server_host = 'redisDOWN';

reload the /administrator/ url

Expected result

Joomla handles this failure with grace.

Joomla doesn't display any Notices or Warnings.

Actual result

Screenshot 2020-08-15 at 13 54 49

avatar PhilETaylor PhilETaylor - open - 15 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - change - 15 Aug 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Aug 2020
avatar wilsonge
wilsonge - comment - 17 Oct 2020

Fix for the undefined variable notice #31121

I'm not really sure if there's a way to catch the php warnings that get thrown (it's the same in the session driver too for that part)

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

I'm not really sure if there's a way to catch the php warnings that get thrown (it's the same in the session driver too for that part)

Correct. This is a problem way up the stack of Joomla, where the session retrieval is done. For example if the db server is down and sessions are being saved in the db, then again we get PHP warnings and a hard to catch 500 error which is hard to report the REAL reason for the error.

I spent a bit of time on this when looking at the new red screen fatal error handler and could not resolve this.

avatar wilsonge
wilsonge - comment - 25 Apr 2021

Ok i think I'm going to close this as a won't fix.

And more in line of technically it's very tricky without underlying redis driver changes to fix this than because I don't want to.

avatar wilsonge wilsonge - change - 25 Apr 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-04-25 22:42:49
Closed_By wilsonge
avatar wilsonge wilsonge - close - 25 Apr 2021
avatar wilsonge
wilsonge - comment - 25 Apr 2021

If anyone does come up with a solution more than happy to consider it clearly. But without a concrete suggestion hard to see how to take this forward

avatar PhilETaylor
PhilETaylor - comment - 26 Apr 2021

Basically 2 things.

  1. We need to catch and not display PHP Warnings. I think I have a solution for this but I doubt anyone will like it, but its needed.

  2. We need to sort out the fatal error handler so that we display the correct Exception and not the wrong Exception, based on my experience with implementing the new Symfony Fatal Red Screen of death, the lower end of that handling is simply wrong and needs some love.

By we, I probably mean, Me.

This is not restricted to the Redis Server being unavailable - the same kind of thing happens whenever a PHP Warning is displayed before a Session starts (as well as when the session storage is down) - as evidenced when playing with the FTP Layer recently.

Add a Comment

Login with GitHub to post a comment