Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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/example.com/track.example.com/piwik/plugins/GeoIP/libs/GeoIP.dat) 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/example.com/track.example.com/piwik/plugins/GeoIP/GeoIP.php 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
add comment

1 Answer

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:
http://www.bigsoft.co.uk/blog/index.php/2007/12/30/fixing-php-s-require-open_basedir-restri

http://www.mydigitallife.info/php-scripts-open_basedir-restriction-in-effect-error/

share|improve this answer
add comment

Your Answer

 
discard

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.