PiHole on Raspbx PHP Session issue

Hi, this is my first post, so please let me know if it is incomplete.

I recently installed PiHole on my Raspberry Pi 4 that already had the Raspbx image on it. I had to move the admin folder after install so it would not interfere with the FreePBX admin GUI and it all seems to be working well EXCEPT to logon to the Admin GUI.

I followed the install bash script steps and let it install default, no changes to using Lighttpd or such. I just changed the port to 8081 and then moved the admin folder.

I reconfigured in the lighttpd file to point to the new folder, changed the permissions and it is all running fine.

The issue is when I click on Login, nothing happens. When I click the CTRL-RETURN on the login screen, I get in, but with an error:

Error

There was a problem applying your settings.
Debugging information:
PHP error (2): session_regenerate_id(): Session write failed. ID: files (path: /var/lib/php/sessions) in /var/www/pihole/admin/scripts/pi-hole/php/password.php:69

I assumed it was a permission issue so I created a user group and put the www-data as well as the FreePBX users in it and granted permission on the /var/lib/php/sessions folder to that group and put 755 on it. The error continues.

I am not an experienced Linux user, but I know a bit. I am not sure what I need to do to resolve this. Some info on the directory:

root@raspbx:~# stat /var/lib/php/sessions
File: /var/lib/php/sessions
Size: 4096 Blocks: 16 IO Block: 4096 directory
Device: b302h/45826d Inode: 3518 Links: 2
Access: (2777/drwxrwsrwx) Uid: ( 0/ root) Gid: ( 1002/ admins)
Access: 2019-09-22 19:32:10.000000000 +0100
Modify: 2021-07-12 10:11:24.177001354 +0100
Change: 2021-07-12 10:16:00.955377414 +0100
Birth: -

Any help would be appreciated.

Aecio Lemos

Please upload a debug log and post just the token that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

Hi jfb,

Thank you for your message. The token generated:
Your debug token is: https://tricorder.pi-hole.net/8nu5qrtgwd

From what I saw, the log is uploaded automatically, correct? If not, I can attach it here.

Thanks for your help.

By the way, even doiing CMOD 777 on that directory, it still did not work.

I gave up and just unnintalled Lighttpd and created a site on Apache to host Pi-Hole admin. No set of permissions, CHOWN or CHMOD solved it so I just gave up trying.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.