r/PHPhelp • u/rp_001 • Jan 15 '25
Failed to write session data
Hi Team,
I use a monitoring tool called Zabbix, whch uses PHP
When importing templates, i get the error "Unexpected server error"
I do see this error in the apache error log:
PHP Warning: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions) in Unknown on line 0,
php version = 8.2
current permissions and owner ship of /var/lib/php/sessions
owner: root
group: root
Permissions: drwx-wx-wt
I tied:
- changing permissions on the session.save_path folder to 777
- changing the ownership to the www-data:www-data (under which apache runs)
- changing the path to /tmp, which is 777
Nothing worked.
At a bit of a loss as to what to do now.
thanks for any assistance.
View all comments
Show parent comment
1
u/rp_001 Jan 16 '25
thanks for the reply, HolyGonzo.
oddly, i was able to upload templates the week earlier so am at a bit of a loss.
however, i will review the SELinux again. I did not think it was implemented but worth double checking.
We did go through an in-place upgrade of the OS and LAMP stack, so that may have failed in some way and a brand new install may be better
cheers