0

I recently changed the root password (SSH), and now PHP's sessions don't work properly. I did not change the path of the sessions, I know that for a fact.

Here's the error I'm receiving:

Warning: Unknown: open(/var/lib/php/session/sess_utto82hjqi9mk4d1hdoahbgf80, O_RDWR) failed: Permission denied (13) in Unknown on line 0 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

Is there some way to fix this?

Ja͢ck
  • 170,779
  • 38
  • 263
  • 309
  • Why are you using the root account for this... – BLaZuRE Jul 28 '13 at 04:53
  • Check for permissions on file and/or folder. – Funk Forty Niner Jul 28 '13 at 04:57
  • Your problem may be that the user account that apache runs as doesn't have permissions to write session data to /tmp (which is configures as sessions.save_path=/tmp in php.ini). So, either you need to give proper permissions to the /tmp dir (chmod 777) or change the session.save_path to a directory where the apache user has access. – Funk Forty Niner Jul 28 '13 at 04:59

1 Answers1

0

Change the permission of the folders, so that the user (which runs the page, e.g. www-data) can write there. You should Google for chmod and chown

BLaZuRE
  • 2,356
  • 2
  • 26
  • 43
bish
  • 3,381
  • 9
  • 48
  • 69