Myddleware / myddleware

Myddleware is the customisable free open-source platform that facilitates data migration and synchonisation between applications.
http://www.myddleware.com
GNU General Public License v3.0
98 stars 50 forks source link

[Solved] Warning: SessionHandler::read(): Redis connection not available #1122

Closed Buda9 closed 5 months ago

Buda9 commented 8 months ago

Hey everyone,

I did a fresh install using git clone and setup from a terminal, and no matter what I did I always receive error 500. So i enabled debug and this is the message I see:

ErrorException: Warning: SessionHandler::read(): Redis connection not available

at /home/user/web/example.com/public_html/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php:59 at Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler->doRead() (/home/user/web/example.com/public_html/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php:99)

My PHP Session Handler is Redis. However, I don't know how to solve this issue in myddleware (and keep Redis as session handler).

I didn't find anything on the internet or this repo that could be of help.

If anyone have any suggestion, please help. Thank you

Buda9 commented 8 months ago

Solution below

Ok, so after I added some changes to the services and framework (see below), I could see this screen:

Screenshot_235

myddleware/public_html/config/services.yaml:

services: Redis: class: Redis calls:

myddleware/public_html/config/packages/framework.yaml:

remove handler_id: null add handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler

After this, I tried to log in or to install and I saw 404 error.

So I run "php bin/console cache:clear" and I could log in normally. But after that I saw a lot of 404 for assets.

What worked for me is running "php bin/console cache:clear" few more times.

Hopefully this will be useful to someone!

Ps. For reference, I'm using hestia cp, nginx and ubuntu 22