We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
open_basedir restriction in effect need to open file from /home/
open_basedir restriction in effect need to open file from /home/
Hello
I am trying to open a file in my website from my /home/geofile/ directory but I keep getting 'open_basedir restriction in effect'
Example of error code:-
Also
This is what is showing in my /usr/local/vesta/data/templates/web/httpd/basedir.stpl
I have tried adding:-
This did not work either (yes I did remake web and restart server)
I have been searching the forum and tried all sorts of fixes but it has not resolved the above problem. I have also restarted my server after each fix and rebuilt web templates.
This never happened with the old install of vesta it only since new install and different php (5.6) in Centos 6.8 that this has happened.
Thanks in advance for your help.
EDIT!!!!!!!!!!!
I solved the problem! And here is how I did it:-
I edited the default.stpl instead of the basedir.stpl because my sites use the 'default template' so basically I was editing the WRONG TEMPLATE!!! DUHHHHHH!!! <begin facepalm></end facepalm>
So I added:-
to default.stpl and rebuilt web in admin and reboot server and all is working as it should :)
I am trying to open a file in my website from my /home/geofile/ directory but I keep getting 'open_basedir restriction in effect'
Example of error code:-
Code: Select all
Warning: include(): open_basedir restriction in effect. File(/home/geofile/test.php) is not within the allowed path(s): (/home/mywebsiteuserfolder/web/vpstest.domain.info/public_html:/home/mywebsiteuserfolder/tmp) in /home/mywebsiteuserfolder/web/vpstest.domain.info/public_html/blah.php on line 28
Code: Select all
Warning: fopen(): open_basedir restriction in effect. File(/home/geofile/GeoIP.dat) is not within the allowed path(s): (/home/mywebsiteuserfolder/web/vpstest.domain.info/public_html:/home/mywebsiteuserfolder/tmp) in /home/mywebsiteuserfolder/web/vpstest.domain.info/public_html/webfile/includes/geoip.inc on line 123
Code: Select all
<Directory %sdocroot%>
AllowOverride All
SSLRequireSSL
Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir %docroot%:%home%/%user%/tmp
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value session.save_path %home%/%user%/tmp
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain$
</Directory>
Code: Select all
php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/home/geofile
I have been searching the forum and tried all sorts of fixes but it has not resolved the above problem. I have also restarted my server after each fix and rebuilt web templates.
This never happened with the old install of vesta it only since new install and different php (5.6) in Centos 6.8 that this has happened.
Thanks in advance for your help.
EDIT!!!!!!!!!!!
I solved the problem! And here is how I did it:-
I edited the default.stpl instead of the basedir.stpl because my sites use the 'default template' so basically I was editing the WRONG TEMPLATE!!! DUHHHHHH!!! <begin facepalm></end facepalm>
So I added:-
Code: Select all
php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/home/geofile