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).


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

| improve this answer | |
  • 1
    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
  • 1
    $ 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
  • 1
    yup realpath more specified. – user139209 Dec 23 '12 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.