PHP Warning: include_once(): open_basedir restrict

2019-09-04 05:57发布

I have migrated a site from one host to another, on this site there is a crm working or at least used to work. Since the migration was done the link to the crm responded with error500-internal server error and I contacted the host in order to check it. They said they fixed it and now it shows me the following

PHP Warning: include_once(): open_basedir restriction in effect. File(/var/www/vhosts/mysite.com/httpdocs/crm/includes/adodbtime/adodb-time.inc.php) is not within the allowed path(s): (G:/PleskVhosts//mysite.com\;C:\Windows\Temp) in G:\PleskVhosts\mysite.com\httpdocs\crm\filefunc.inc.php on line 229

PHP Warning: include_once(/var/www/vhosts/mysite.com/httpdocs/crm/includes/adodbtime/adodb-time.inc.php): failed to open stream: Operation not permitted in G:\PleskVhosts\mysite.com\httpdocs\crm\filefunc.inc.php on line 229

PHP Warning: include_once(): Failed opening '/var/www/vhosts/mysite.com/httpdocs/crm/includes/adodbtime/adodb-time.inc.php' for inclusion (include_path='G:\PleskVhosts\mysite.com\httpdocs/htdocs') in G:\PleskVhosts\mysite.com\httpdocs\crm\filefunc.inc.php on line 229

PHP Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/mysite.com/httpdocs/crm/core/lib/functions.lib.php) is not within the allowed path(s): (G:/PleskVhosts//mysite.com\;C:\Windows\Temp) in G:\PleskVhosts\mysite.com\httpdocs\crm\filefunc.inc.php on line 231

I'm using plesk panel and I'm really new to this. The solutions I came up with require changes to the php.ini file that I have no access to. Before I contact the host again I thought I would ask here first.

I'm showing the code on those lines to if it is a bit of help:

if (! defined('ADODB_DATE_VERSION')) include_once ADODB_PATH.'adodb-time.inc.php';

if (! file_exists(DOL_DOCUMENT_ROOT ."/core/lib/functions.lib.php"))

1条回答
甜甜的少女心
2楼-- · 2019-09-04 06:19

You have to add the directory to the allowed paths of your server. This post is well explanatory.

Aditionally if you are using Plesk, probably the easiest way to set this path is to set it through php.ini on the root directory of your application.

open_basedir = /var/www/vhosts/mysite.com/httpdocs/crm/includes/adodbtime

查看更多
登录 后发表回答