• Home  |
  • Support  |
  • FAQ  |
  • General  |
  • DokuWiki open_basedir restriction in effect. File is not within the allowed path

FAQ - General

Question
DokuWiki open_basedir restriction in effect. File is not within the allowed path
Answer

This guide is to help users fix the below error message when trying to set up DokuWiki. The environment we used is as follows:

  • Windows Server 2008 R2
  • IIS 7 with PHP and FastCGI

This guide still may be useful to you if your environment differs from the one described above.

This error happens because the folder used for storing temporary files including user's session data resides outside the root directory of DokuWiki according to your PHP.ini file.

 

PHP Warning: require_once(): open_basedir restriction in effect.
File(C:\inetpub\wwwroot\Dokuwiki\inc\lang\en\lang.php) is not within the allowed path(s): (C:\Windows\Temp) in C:\inetpub\wwwroot\Dokuwiki\install.php on line 29
PHP Warning: require_once(C:\inetpub\wwwroot\Dokuwiki\inc\lang\en\lang.php): failed to open stream: Operation not permitted in C:\inetpub\wwwroot\Dokuwiki\install.php on line 29
PHP Fatal error: require_once(): Failed opening required 'C:\inetpub\wwwroot\Dokuwiki/inc/lang/en/lang.php' (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\Dokuwiki\install.php on line 29

 

Solution

  • Open up your php.ini file in a text editor. it is located at: *Your chosen php install directory*/php.ini
  • Change the "upload_tmp_dir" variable value to "*DokuWiki Root*\data\tmp"
  • Change the "session.save_path" variable value to "*DokuWiki Root*\temp"
  • Change the "soap.wsdl_cache_dir" variable value to "*DokuWiki Root*\temp"
  • Now navigate to the root of your DokuWiki installation and create a new folder called "temp"
  • Right click it, click "Properties" then choose the "Security" tab
  • Click "Edit" then "Add" and type "IUSR" and click OK
  • Click "OK" to close the edit window and "OK" again to close the properties window
  • Now open IIS7
  • Click the "+" button next to your server on the left then click the "+" button next to the "Sites" folder
  • Click the DokuWiki site and click "Restart" on the right hand side

Now refresh the DokuWiki installer and you should go straight past the previous error message. Good luck!

If you found this information useful, please share it!


This FAQ was last updated on 21 July 2011

Contact Information

To find out more about Ava solutions you can contact us in a number of ways:
Follow Us...