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.

So I'm following this solution:

But I have no idea what to put in username.

This is how it looks when I launch the terminal:


My user is "alex" (e.g.



Any suggestions?

share|improve this question
up vote 10 down vote accepted

The chown command has the following syntax:

chown username:groupname directory

So in your example command it is your primary group name you need to put To determine your current user name issue the command as below on a terminal


This will return your current user name. Then issue this command to determine your group memberships

groups username

Assuming that your username is "alex", run:

groups alex

You will get something like:

alex : alex staff adm cdrom lpadmin admin

The first one after the : is your primary group. In this example it is "alex".

The command will be:

sudo chown -R root:alex /var/lib/php/session
share|improve this answer
Thanks I think it helped but I'm getting this: chown: cannot access /var/lib/php/session': No such file or directory` ' – janoChen Jun 17 '11 at 5:57
Yes, That directory may not be there. The command will work only when the directory present. So you might have missed some steps in that documentation or some steps before that did not work as expected. – Jamess Jun 17 '11 at 6:00
Usually I do 'ls -l /var/lib/php/session' to list the directory to see current ownership before I change it. Then I will know how to revert it if something gone wrong!. That command will help you to see if the directory present or not as well. – Jamess Jun 17 '11 at 6:02

That would be:

sudo chown -R root:alex /var/lib/php/session

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.