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/[deleted] Jan 16 '25
Well, a couple of things I noticed: you are assuming that the session warnings are related to being able to upload a template. That issue might have been fixed, as I would assume that without working session support something as simple as login wouldn't work.
Templates are stored in the zabbix database I believe, so there could be an entirely different issue that has nothing to do with sessions.