There are upcoming maintenance events which may impact our services. Learn more

Repairing PHP Session errors Print

  • 0

Problem Description

You may receive an error like:

[warn] mod_fcgid: stderr: PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0

This means that PHP cannot write to the session folder.

Problem Resolution

There are a few permissions adjustments that could be made to fix this, however the following is optimal:

chmod 733 /var/lib/php/session
chmod +t /var/lib/php/session

+t sets the sticky bit for the directory such that “when the sticky bit is set, only the item’s owner, the directory’s owner, or the superuser can rename or delete files”.


Was this answer helpful?

← Back