Page 1 of 1

Incorrect open_basedir

Posted: Fri Jun 07, 2019 8:03 pm
by cyberking55
Hello all,
I am trying to install a SMM panel on my subdomain, Its a laravel script so in the project folder there is a public folder which i put in public_html and all the other files I put in smm folder outside public_html folder.

Now I am getting this error:

Warning: require(): open_basedir restriction in effect. File(/home/admin/web/smm.dreamwebsters.com/smm/bootstrap/autoload.php) is not within the allowed path(s): (/home/admin/web/smm.dreamwebsters.com/public_html:/home/admin/tmp) in /home/admin/web/smm.dreamwebsters.com/public_html/index.php on line 28

Warning: require(/home/admin/web/smm.dreamwebsters.com/smm/bootstrap/autoload.php): failed to open stream: Operation not permitted in /home/admin/web/smm.dreamwebsters.com/public_html/index.php on line 28

Fatal error: require(): Failed opening required '/home/admin/web/smm.dreamwebsters.com/public_html/../smm/bootstrap/autoload.php'
(include_path='.:/usr/share/php') in /home/admin/web/smm.dreamwebsters.com/public_html/index.php on line 28

What should I do? I have read few articles which told me to edit

/usr/local/vesta/data/templates/web/apache2/basedir.tpl
/usr/local/vesta/data/templates/web/apache2/basedir.stpl

but how to do it and what should I add in it?

Re: Incorrect open_basedir

Posted: Mon Jul 29, 2019 3:14 pm
by dreiggy
As I understand from your error, you should add location to your domain open_basedir record: /usr/share/php

@Edit:
Better add whole domain dir: /home/admin/web/smm.dreamwebsters.com/

Re: Incorrect open_basedir

Posted: Mon Jul 29, 2019 8:11 pm
by Alex Connor
dreiggy wrote:
Mon Jul 29, 2019 3:14 pm
As I understand from your error, you should add location to your domain open_basedir record: /usr/share/php
No, its wrong. Script need access to folder /home/admin/web/smm.dreamwebsters.com/smm/bootstrap/, but basedir not allowed. So, for resolving this problem, you may edit your domain config (or best practice create new config and add that folder to basedir record