Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have a problem with apache. session_start() error. i think my apache have not permission to write and i don't know how fix it. i run:

ls -al /var/lib/ | grep php5
drwx-wx-wt  2 root          root          4096 Apr  4 16:15 php5

what can i do? thanks for help

share|improve this question
up vote 0 down vote accepted

First of all, are you sure it stores the sessions in /var/lib/php5? Do you have root access? If so, you can fix it yourself, if not, ask your admin to do the same as you would to fix it yourself, namely this:

  1. find out who apache runs as (for instance, `www-data`, `apache`, or `httpd`)
  2. make the session directory writable for that user.

For instance: ps -ef | egrep -e 'http|apache' will show on the first column the username of the apache user. On my machine the username is apache.

Check the group membership of that user with id -a apache

uid=48(apache) gid=48(apache) groups=48(apache)

Then change the group ownership and permissions on the sessions directory:

chgrp apache /var/lib/php5/session && chmod g+w /var/lib/php5/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.