Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Warning: file_exists(): open_basedir restriction in effect. Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
elamigosam21
Posts: 23
Joined: Mon Nov 21, 2016 5:47 am

Os: CentOS 6x
Web: apache + nginx
Warning: file_exists(): open_basedir restriction in effect.
  • Quote

Post by elamigosam21 » Wed Sep 04, 2019 10:06 pm

I am migrating wordpress to a new server,
my old server had wordpress with php 5.6.40 CentOS 7
my new server is php 7.2 in Ubuntu
I restored a backup from vestacp to the new server,
but on wordpress I keep getting this error message:

Code: Select all

Warning: file_exists(): open_basedir restriction in effect. File(/home/wreuser/web/hub.domain.com/public_html/wp-content/db.php) is not within the allowed path(s): (/home/wreuser/web/hub.domain.com/public_html:/home/wreuser/tmp) in /home/wreuser/web/hub.domain.com/public_html/wp-content/plugins/query-monitor/output/html/db_queries.php on line 165
I have tried this on wp-config.php but no luck:

Code: Select all

define('WP_TEMP_DIR', dirname(__FILE__).'../../../tmp');
I have also tried rebuilding the user, no luck:

Code: Select all

/usr/local/vesta/bin/v-rebuild-user
any ideas as to what else I can try?

thanks
Top

sysdop
Posts: 88
Joined: Fri Dec 08, 2017 1:46 am
Contact:
Contact sysdop
Website Skype

Os: CentOS 6x
Web: nginx + php-fpm
Re: Warning: file_exists(): open_basedir restriction in effect.
  • Quote

Post by sysdop » Thu Sep 05, 2019 1:48 am

Try this

viewtopic.php?f=11&t=19039&p=79109&hili ... dir#p79109
Top

elamigosam21
Posts: 23
Joined: Mon Nov 21, 2016 5:47 am

Os: CentOS 6x
Web: apache + nginx
Re: Warning: file_exists(): open_basedir restriction in effect.
  • Quote

Post by elamigosam21 » Thu Sep 05, 2019 4:17 pm

It worked,
will this have a secondary effect since the installation mentioned in the link was laravel, and my is a wordpress?
Top

elamigosam21
Posts: 23
Joined: Mon Nov 21, 2016 5:47 am

Os: CentOS 6x
Web: apache + nginx
Re: Warning: file_exists(): open_basedir restriction in effect.
  • Quote

Post by elamigosam21 » Thu Sep 05, 2019 4:18 pm

If it is default in SSH you should go to:

1) cd /usr/local/vesta/data/templates/web

2) edit the default.tpl and default.stpl using nano
apt-get install nano -y && nano default.tpl default.stpl

3) Find and remove:
php_admin_value open_basedir %docroot%:%home%/%user%/tmp

4) Save and download
#apt-get install wget -y && cd && wget repo.sysdop.com/rvcp.sh -O rvcp.sh && sh rvcp.sh
sudo /usr/local/vesta/bin/v-rebuild-user username

5) Done!
Top

Vegas10128
Posts: 38
Joined: Tue Aug 16, 2016 4:58 pm

Re: Warning: file_exists(): open_basedir restriction in effect.
  • Quote

Post by Vegas10128 » Sun Nov 21, 2021 12:04 am

does not work, cannot find default files in instructed directory.

Working on ubuntu 18.04
Top


Post Reply
  • Print view

5 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password