下面是错误代码:

Warning: require(): open_basedir restriction in effect.
Warning: require(XXXXXXXXXXX): failed to open stream: Operation not permitted in XXXX

  

以下有两种解决方案:

1.去掉网站目录下的勾选,防跨站攻击(open_basedir),然后重启php服务。

2.方案2,修改目录下的.user.ini的隐藏文件

chattr -i .user.ini
vi .user.ini
追加 “:/www/wwwroot/XXXXX/”

最后最重要的就是重启php服务!!!

宝塔部署时,出现“open_basedir restriction in effect”错误的更多相关文章

  1. php 环境require(): open_basedir restriction in effect 错误

    php 环境require(): open_basedir restriction in effect 错误 错误日志显示,访问脚本不在 open_basedir的限定目录里面 解决方法打开fastc ...

  2. LNMP - Warning: require(): open_basedir restriction in effect错误解决方法

    LNMP 1.4或更高版本如果不想用防跨目录或者修改.user.ini的防跨目录的目录还需要将 /usr/local/nginx/conf/fastcgi.conf 里面的fastcgi_param ...

  3. tp5 宝塔open_basedir restriction in effect 错误; IIS open_basedir restriction in effect

    很久前做过的一个微信项目,客户突然找到我说换了部署环境后网站报错,再跟客户确定了php版本,伪静态设置后,网站依旧打不开,官网手册这样解释: 然而因为客户是iis8的表示该文档一点鸡毛用都米有哇,求助 ...

  4. lnmp 环境require(): open_basedir restriction in effect 错误

    最近配置开发用的lnmp环境,环境配置完成后,爆500错误,查看nginx错误日志 open_basedir 将 PHP 所能打开的文件限制在指定的目录树,包括文件本身 错误日志显示,访问脚本不在 o ...

  5. 使用宝塔配置laravel站点时,遇到open_basedir restriction in effect. 原因与解决方法

    今天一位朋友在linux服务器部署thinkphp5的时候PHP报了这个错误,如下: Warning: require(): open_basedir restriction in effect. F ...

  6. open_basedir restriction in effect,解决php引入文件权限问题 解决方法

    如下: 出现问题的原因: 查看问题描述以及资料,发现是php open_basedir 配置的问题,PHP不能引入其授权目录上级及其以上的文件: 一般情况下是不会出现这种问题的,之所以出现这个问题绝大 ...

  7. require(): open_basedir restriction in effect. 解决方法

    在linux服务器部署thinkphp5的时候PHP报了这个错误, 如下: Warning: require(): open_basedir restriction in effect. File(/ ...

  8. php错误提示 open_basedir restriction in effect 解决

    <VirtualHost *:80> DocumentRoot "D:/www/4w_raaaa_com_2017" ServerName www.raaaa.com: ...

  9. PHPExcel中open_basedir restriction in effect的解决方法

    用PHPExcel做导出execl的时候发现在本地没有问题,但是把网站传到租用的服务器的时候就报错,具体如下: Warning: realpath() [function.realpath]: ope ...

随机推荐

  1. linux DRM/KMS 测试工具 modetest、kmscude、igt-gpu-tools (二)

    kmscube   kmscube is a little demonstration program for how to drive bare metal graphics without a c ...

  2. 安装依赖jdk---linux

    1,下载JDK http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 2,使用XFTP ...

  3. MySQL的日期类型

    -- MySQL 中有多种数据类型可以用于日期和时间的表示,不同的版本可能有所差异,表 3-2 中-- 列出了 MySQL 5.0 中所支持的日期和时间类型.-- 表 3-2 MySQL 中的日期和时 ...

  4. [微信营销企划之路]001.环境搭建(XAMPP+WeiPHP)

    引言 本系列适合0基础的人员,因为我们就是从0开始的,此系列记录我们步入微信营销企划并进行开发的一些经验分享,望与君共勉!作为刚刚踏入微信队伍中的新人的我们,如果有什么不对的地方,还望不吝赐教. 在开 ...

  5. [PHP插件教程]003.PhpRedis

    PhpRedis 介绍 Mac安装步骤 安装Redis 安装PhpRedis 示例代码 介绍 Redis是一个高性能的key-value数据库. Redis提供了Java,C/C++,C#,PHP,J ...

  6. 错误记录:Data too long for column 'xxx' at row 1

    错误记录:Data too long for column 'xxx' at row 1 使用Flask-sqlalchemy操作数据时报错: "Data too long for colu ...

  7. spring boot 整合 poi 导出excel

    一. 第一种方式 1.首先从中央仓库中导入架包Poi3.14以及Poi-ooxml3.14. <dependency> <groupId>org.apache.poi</ ...

  8. python调用大漠插件教程04鼠键事件及基本项目思维

    from win32com.client import Dispatch import os from random import uniform from time import sleep cla ...

  9. 【算法基础】KMP字符串

    给定一个模式串S,以及一个模板串P,所有字符串中只包含大小写英文字母以及阿拉伯数字. 模板串P在模式串S中多次作为子串出现. 求出模板串P在模式串S中所有出现的位置的起始下标. 输入格式 第一行输入整 ...

  10. Rocket - util - GenericParameterizedBundle

    https://mp.weixin.qq.com/s/vf0PfjbxQ3Ywjk6tk85SfA   介绍GenericParameterizedBundle的实现.   ​​   1. 基本介绍 ...