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 tried to add this line to my virtual hosts in Apache, but failed:

php_admin_value open_basedir "/var/www/users/test"

My installation:

root# apt-get install apache2 apache2-suexec libapache2-mod-fcgid php5-cgi

Any ideas?

Something I noticed in php manual that worried me enough ( open_basedir is marked as PHP_INI_ALL meaning "Entry can be set anywhere" so, even at run-time a user can change it or am I having wrong?*

(*: confirmed, user can NOT change it at run-time)

share|improve this question

Setting php ini options in the apache config only affects php when running as an apache module. For CGI / FastCGI, the setting need to be added to the php.ini (or via ini_set - but this doesn't make much sense for open_basedir unless it's via an auto-prepend).

share|improve this answer
So, we can simply set it at php.ini as long as user is not allowed to edit it! 'auto-prepend' feature gives me some ideas for increased security(?!). Thanks. – centurian Apr 11 '13 at 9:50

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.