PHP警告:include_once():open_basedir限制已生效 [英] PHP Warning: include_once(): open_basedir restriction in effect

查看:268
本文介绍了PHP警告:include_once():open_basedir限制已生效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将一个站点从一个主机迁移到另一个主机,此站点上有crm有效,或者至少曾经有效.由于迁移已完成,因此到crm的链接响应为error500-internal server error,因此我联系了主机以对其进行检查.他们说他们已修复它,现在它向我显示了以下内容

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警告:include_once():open_basedir限制已生效.文件(/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(): 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警告:include_once(/var/www/vhosts/mysite.com/httpdocs/crm/includes/adodbtime/adodb-time.inc.php):无法打开流:G:\ PleskVhosts \中不允许进行该操作第229行的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"进行包含(include_path ='G:\ PleskVhosts 229行上的G:\ PleskVhosts \ mysite.com \ httpdocs \ crm \ filefunc.inc.php中的\ mysite.com \ httpdocs/htdocs')

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警告:file_exists():open_basedir限制有效.文件(/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中

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

我正在使用plesk面板,对此我真的很陌生.我想出的解决方案需要更改我无法访问的php.ini文件.在再次联系房东之前,我想先问一下这里.

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"))

推荐答案

您必须将目录添加到服务器的允许路径中. 帖子具有很好的解释性.

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

另外,如果您使用的是Plesk,则设置此路径的最简单方法可能是通过应用程序根目录上的php.ini进行设置.

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

这篇关于PHP警告:include_once():open_basedir限制已生效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆