Bludit CMS. Session initialization failed.
-
- Jr. Bludit
- Posts: 8
- Joined: Fri May 28, 2021 3:20 am
I just installed Bludit using the official docker image.
I added volume mounts for bl-content, bl-plugins, and bl-theme so I can easily manage things.
I ran into a permissions issue on my first run of the installer which a lazily resolved by doing a chmod on the bl-content directory on the host machine.
The next run of the installer ended with a 'Please check your theme configuration in the admin panel. Check for an active theme.'
I was a bit confused since this was a 'fresh' docker install. So I tried to goto domain.tld:8000/admin and I got the "Bludit CMS. Session initialization failed." message.
I tried to check the logs in the docker container but they get sent to /dev/stdout and /dev/stderr. So no logs to see what's going on.
I tried to chmod 777 for all of bl-content but that didn't help.
I read an old post about permissions for /var/lib/php/sessions but the docker container does not have a php/ directory in /var/lib.
I'm not sure where to go from here. Maybe bl-content can't live outside of the container, but that doesn't make much sense....
I added volume mounts for bl-content, bl-plugins, and bl-theme so I can easily manage things.
I ran into a permissions issue on my first run of the installer which a lazily resolved by doing a chmod on the bl-content directory on the host machine.
The next run of the installer ended with a 'Please check your theme configuration in the admin panel. Check for an active theme.'
I was a bit confused since this was a 'fresh' docker install. So I tried to goto domain.tld:8000/admin and I got the "Bludit CMS. Session initialization failed." message.
I tried to check the logs in the docker container but they get sent to /dev/stdout and /dev/stderr. So no logs to see what's going on.
I tried to chmod 777 for all of bl-content but that didn't help.
I read an old post about permissions for /var/lib/php/sessions but the docker container does not have a php/ directory in /var/lib.
I'm not sure where to go from here. Maybe bl-content can't live outside of the container, but that doesn't make much sense....
-
- Jr. Bludit
- Posts: 8
- Joined: Fri May 28, 2021 3:20 am
So I found the docker logs in Portainer (totally forgot about that feature) and I noticed an error message
I checked that location in the docker container. The ownership is nginix:niginix. I don't remember what the permissions were for the dir but I do know /sessions should be 1733 so I made that change.
Setting permissions to 1733 didn't change the outcome.
I checked to make sure that nginx and php-fpm were both using the nginx:nginx user and group which they were. So there should be no permissions issue for /session.
Still even after restarting the container I still get the permissions issue for /session which remains empty.
Code: Select all
[error] 11#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: session_start(): open(/var/opt/rh/rh-php72/lib/php/session/sess_uec1qog0rcflq2dh00pqga3jgl, O_RDWR) failed: Permission denied (13) in /usr/share/nginx/html/bl-kernel/helpers/session.class.php on line 34
Setting permissions to 1733 didn't change the outcome.
I checked to make sure that nginx and php-fpm were both using the nginx:nginx user and group which they were. So there should be no permissions issue for /session.
Still even after restarting the container I still get the permissions issue for /session which remains empty.
-
- Jr. Bludit
- Posts: 8
- Joined: Fri May 28, 2021 3:20 am
I did a chmod 777 on the /session directory in /var/opt/rh/rh-php72/lib/php and it doesn't seemed to have helped.
Here is the log data after trying to connecting to <ip>:8000/admin
/session remains empty
Here is the log data after trying to connecting to <ip>:8000/admin
Code: Select all
2021/05/28 08:33:30 [error] 11#0: *4 FastCGI sent in stderr: "PHP message: PHP Warning: session_start(): open(/var/opt/rh/rh-php72/lib/php/session/sess_uec1qog0rcflq2dh00pqga3jgl, O_RDWR) failed: Permission denied (13) in /usr/share/nginx/html/bl-kernel/helpers/session.class.php on line 34
PHP message: PHP Warning: session_start(): Failed to read session data: files (path: /var/opt/rh/rh-php72/lib/php/session) in /usr/share/nginx/html/bl-kernel/helpers/session.class.php on line 34
PHP message: [INFO] [3.13.1] [/admin/] Session::start | Error occurred when trying to start the session" while reading response header from upstream, client: 192.168.1.135, server: , request: "GET /admin/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.1.105:8000"
192.168.1.135 - - [28/May/2021:08:33:30 -0400] "GET /admin/ HTTP/1.1" 200 53 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0" "-"
-
- Jr. Bludit
- Posts: 8
- Joined: Fri May 28, 2021 3:20 am
Found this solution that worked
viewtopic.php?f=6&t=1590&start=10
Doesn't seem like a proper solution though as it requires mucking about in the container
viewtopic.php?f=6&t=1590&start=10
Doesn't seem like a proper solution though as it requires mucking about in the container