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 installed a local MediaWiki and gave it access to the following directories in php.ini:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/mediawiki

Why do I still get the following message? It doesn't make sense to me:

<b>Warning</b>:  is_file(): open_basedir restriction in effect. File(/usr/share/webapps/mediawiki/images/lock_yBgMBwiR) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/mediawiki) in <b>/usr/share/webapps/mediawiki/includes/GlobalFunctions.php</b> on line <b>1196</b><br />

How can /usr/share/webapps/mediawiki/images/lock_yBgMBwiR not be within /usr/share/webapps/mediawiki?

I don't have further restrictions in httpd.conf (I've read in the official php documentation that file open_basedir statements can be too).

share|improve this question
up vote 3 down vote accepted

Maybe /usr/share/webapps/mediawiki/images/lock_yBgMBwiR is symlink folder, check with ls -l.

share|improve this answer
You can try realpath /usr/share/webapps/mediawiki/images/lock_yBgMBwiR to see what it actually resolves to. – chutz Oct 30 '12 at 11:50
$ realpath /usr/share/webapps/mediawiki/images/lock_yBgMBwiR gave me /var/lib/mediawiki/lock_yBgMBwiR. Thanks! – Konrad Höffner Oct 30 '12 at 13:12
yup realpath more specified. – Andi Susilo Dec 23 '12 at 21:38

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.