简体   繁体   English

PHP警告:include_once():open_basedir限制已生效

[英]PHP Warning: include_once(): open_basedir restriction in effect

I have migrated a site from one host to another, on this site there is a crm working or at least used to work. 我已将一个站点从一个主机迁移到另一个主机,此站点上有crm在起作用,或者至少曾经起作用。 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. 由于迁移已完成,因此到crm的链接响应为error500-internal server error,我联系了主机以对其进行检查。 They said they fixed it and now it shows me the following 他们说他们修复了它,现在它向我展示了以下内容

PHP Warning: include_once(): open_basedir restriction in effect. PHP警告:include_once():open_basedir限制有效。 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 文件(/var/www/vhosts/mysite.com/httpdocs/crm/includes/adodbtime/adodb-time.inc.php)不在允许的路径内:(G:/PleskVhosts//mysite.com \\ ; C:\\ Windows \\ Temp)在第229行的G:\\ PleskVhosts \\ mysite.com \\ httpdocs \\ crm \\ filefunc.inc.php中

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警告:include_once(/var/www/vhosts/mysite.com/httpdocs/crm/includes/adodbtime/adodb-time.inc.php):无法打开流:G:\\ PleskVhosts \\ mysite.com中不允许进行操作第229行的\\ httpdocs \\ crm \\ filefunc.inc.php

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警告:include_once():无法打开“ /var/www/vhosts/mysite.com/httpdocs/crm/includes/adodbtime/adodb-time.inc.php”进行包含(include_path ='G:\\ PleskVhosts \\ mysite。第229行的G:\\ PleskVhosts \\ mysite.com \\ httpdocs \\ crm \\ filefunc.inc.php中的com \\ httpdocs / htdocs')

PHP Warning: file_exists(): open_basedir restriction in effect. PHP警告:file_exists():open_basedir限制有效。 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 文件(/var/www/vhosts/mysite.com/httpdocs/crm/core/lib/functions.lib.php)不在允许的路径内:(G:/PleskVhosts//mysite.com \\; C :\\ Windows \\ Temp)在231行的G:\\ PleskVhosts \\ mysite.com \\ httpdocs \\ crm \\ filefunc.inc.php中

I'm using plesk panel and I'm really new to this. 我正在使用plesk面板,对此我真的很陌生。 The solutions I came up with require changes to the php.ini file that I have no access to. 我想出的解决方案需要更改我无法访问的php.ini文件。 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"))

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. 另外,如果您使用的是Plesk,设置此路径的最简单方法可能是通过应用程序根目录上的php.ini进行设置。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM