Page 1 of 1

open_basedir problems with MediaWiki

Posted: Tue Jun 13, 2017 4:46 pm
by jseidl
Hello, i want to install MediaWiki today. But when I want to install it there was this problem:

Code: Select all

Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/nicecarwash.at/web/wiki.nicecarwash.at/public_html:/home/nicecarwash.at/tmp) in /home/nicecarwash.at/web/wiki.nicecarwash.at/public_html/includes/libs/filebackend/fsfile/TempFSFile.php on line 90
I dont know what I should do.

I hope anyone can help me

Re: open_basedir problems with MediaWiki

Posted: Fri Jun 16, 2017 3:36 pm
by Naldinho
Don't have any experience with that but two things I would check

1) Do all the files and directories in public_html belong to admin?

2) If using php 7 does MediaWiki work with php 7. I was getting a much of errors on a different platform because it isn't able to work with php 7 which if you install VestaCP on ubuntu is the default

Other than that I don't have any suggestions -- hopefully, someone more knowledgeable comes along

Re: open_basedir problems with MediaWiki

Posted: Sat Jun 17, 2017 5:57 am
by noogen
open_basedir settings can be modified in php.ini, apache http.conf, or in individual site apache conf. It is not directly related to vestacp.

You can add additional path (/tmp) in this case to the open_basedir setting. This may help: https://stackoverflow.com/questions/238 ... t-access-t

Re: open_basedir problems with MediaWiki

Posted: Sat Jun 17, 2017 8:21 am
by ScIT
noogen wrote:open_basedir settings can be modified in php.ini, apache http.conf, or in individual site apache conf. It is not directly related to vestacp.

You can add additional path (/tmp) in this case to the open_basedir setting. This may help: https://stackoverflow.com/questions/238 ... t-access-t
open_basedir is related to vestacp, because it is set inside of the templates.

You can create a own template and modify the openbasedir line with adding a :/tmp

Code: Select all

cd /usr/local/vesta/data/templates/web/apache2/
cp default.tpl mediawiki.tpl
cp default.stpl mediawiki.stpl

modify in mediawiki.tpl and mediawiki.stpl the following line:
php_admin_value open_basedir %docroot%:%home%/%user%/tmp
to
php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/tmp
Then you can set the apache2 template inside of your vestacp to mediawiki, so your mediawiki should work.