Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm getting this:

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

I followed this tutorial to fix the problem:

But I don't actually have a /var/lib/php/session' directory.

(I only have a var/lib/php5 directory)

I get this:

chown: cannot access `/var/lib/php/session': No such file or directory

Any suggestions?

(I didn't touch anything, so I assume an update screwed something).


in var/lib/php

there is a file called: sess_eq4jhtrmumanft46oj7o97phdbtv8bcm

and it has this:

enter image description here

(Sorry, I can't paste the code for some reason).

share|improve this question
Pl. tell the content of PHP.ini under session.save_path? – Rahul Prasad Jun 17 '11 at 6:25
Can you post output of 'ls -l /var/lib/php5'? If you have directory, session inside, you should treat the command as 'chown -R root:alex /var/lib/php5/session' instead of /var/lib/php/session. – Jamess Jun 17 '11 at 8:42
up vote 4 down vote accepted

create the folder sudo mkdir /var/lib/php/session and give it a sudo chmod 777 /var/lib/php/session privilege (just for testing)

If it start working give it appropriate privilege(using chmod) or change owner (using chown).

share|improve this answer
advising 'chmod 777' without explaining what it will do to the security is an overkill, so not recommended. – Jamess Jun 17 '11 at 8:43
@James: Dude he got more reputation than me, I assumed he understands what 'chmod 777' means. In that case you might be saying why I did not explained 'sudo', cuz even working is root is also dangerous. – Rahul Prasad Jun 19 '11 at 8:06

This happens due to the incorrect settings of php session.save_path. Here is a detailed instruction on how to solve this issue:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.