Server Fault is a question and answer site for system and network administrators. 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 having trouble with open_basedir. I just discovered the following while randomly checking my PHP error log:

[25-Apr-2012 10:49:58 UTC] PHP Warning:  is_file(): open_basedir restriction in effect. File(/var/www/user_name/ is not within the allowed path(s): (/var/www/user_name:/usr/share/php5:/usr/share/php:/var/run/mysqld) in /var/www/user_name/ on line 317

The real name does contain an underscore. So, as is clearly visible, the file is inside one of the allowed directories.

The php.ini looks like this:

open_basedir = "/var/www/user_name:/usr/share/php5:/usr/share/php:/var/run/mysqld"

PHP is invoked by Apache 2 via fastcgi.

Update: Oh yeah, almost forgot: The /var/www directory is a bind mount.

share|improve this question

We had a similar problem. Changing php.ini was not helping at all.

Configuring apache conf files and restarting apache might resolve your problem.

Here are a few helpful links with more info:

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.