<VirtualHost *:80>
DocumentRoot "D:/www/4w_raaaa_com_2017"
ServerName www.raaaa.com:80
ServerAlias
ServerAdmin webmaster@t.rajlyy.com
DirectoryIndex index.html index.htm index.php default.php app.php u.php
ErrorLog logs/t.rajlyy.com-error.log
CustomLog logs/t.rajlyy.com-access_%Y%m%d.log comonvhost
php_admin_value open_basedir "D:\www\4w_raaaa_com_2017\;D:\UPUPW_AP5.4\memcached\;D:\UPUPW_AP5.4\phpmyadmin\;D:\UPUPW_AP5.4\temp\;C:\WINDOWS\Temp\"
<Directory "D:/www/4w_raaaa_com_2017">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

</VirtualHost>

由于增加了红色部分的内容,php 只能够访问D:\www\4w_raaaa_com_2017\ 这个目录下面的内容,

只用copy()做图片拷贝文件时就会报错:
02-17 08:42:00 | 2 | copy(): open_basedir restriction in effect. File(http://m.6066888.com/uploads/allimg/160525/1-160525143RMJ.jpg) is not within the allowed path(s): (D:\www\4w_raaaa_com_2017\;D:\UPUPW_AP5.4\memcached\;D:\UPUPW_AP5.4\phpmyadmin\;D:\UPUPW_AP5.4\temp\;C:\WINDOWS\Temp") | phpcms\libs\classes\attachment.class.php | 171

解决方法:

正常情况增加临时目录,并给于写权限就行了,如还不能解决

将红色的部分去掉,重启Apache

php错误提示 open_basedir restriction in effect 解决的更多相关文章

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

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

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

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

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

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

  4. thinkPHP5配置nginx环境无法打开(require(): open_basedir restriction in effect. File(/mnt/hgfs/root/tp5/thinkphp/start.php) is not within the allowed path(s)

    今天想把玩一下tp5,结果怎么都无法访问,每次都是报500错误,我把错误提示都打开看到下面的错误 require(): open_basedir restriction in effect. File ...

  5. 解决 php 报错 open_basedir restriction in effect或者nginx提示No input file specified怎么办

    解决 php 报错 open_basedir restriction in effect或者nginx提示No input file specified怎么办 问题是出现在了PHP.INI上面了 ,原 ...

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

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

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

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

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

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

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

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

随机推荐

  1. 两数之和 II - 输入有序数组

    题目描述 给定一个已按照升序排列 的有序数组,找到两个数使得它们相加之和等于目标数. 函数应该返回这两个下标值 index1 和 index2,其中 index1 必须小于 index2. 说明: 返 ...

  2. nodejs的某些api~(四)udp&dns

    今天记udp/数据报套接字和dns. udp UDP/数据报套接字 => require('dgram');dgram.createServer([type],[cb]);type:可以是'ud ...

  3. (一)flask-sqlalchemy的安装和配置

    在使用flask-sqlalchemy之前要先了解ORM模型,什么叫做ORM模型 一.什么是ORM ORM 全拼Object-Relation Mapping. 称为对象-关系映射 主要实现模型对象到 ...

  4. 编写高质量代码:改善Java程序的151个建议 --[106~117]

    编写高质量代码:改善Java程序的151个建议 --[106~117] 动态代理可以使代理模式更加灵活 interface Subject { // 定义一个方法 public void reques ...

  5. Java 验证代理ip

    原文地址:http://www.cnblogs.com/junrong624/p/5416503.html 1 import java.io.IOException; import java.io.I ...

  6. Django session相关操作

    Django session 是存储在数据库中的所以要先跟数据库建立连接 本连接有Django跟数据库建立连接的操作:https://www.cnblogs.com/Niuxingyu/p/10296 ...

  7. unittest的使用二——生成基于html的测试报告

    mac下的安装: 1.下载HTMLTestRunner.py文件,下载地址http://tungwaiyip.info/software/HTMLTestRunner.html,可以复制里面的内容到一 ...

  8. bzoj1233 单调队列优化dp

    https://www.lydsy.com/JudgeOnline/problem.php?id=1233 数据结构优化dp的代码总是那么抽象 题意:奶牛们讨厌黑暗. 为了调整牛棚顶的电灯的亮度,Be ...

  9. db mysql / mysql cluster 5.7.19 / performance

    s 问题1: 数据库底层若表碎片化严重,导致表索引走向偏差,致使该表读写速度变慢,影响业务运行 解决1: 数据库表重组 end

  10. Http接口开发(自测服务端客户端)

    一.  Http与Https的区别             1.概念       HTTP:是互联网上应用最为广泛的一种网络协议,是一个客户端和服务器端请求和应答的标准(TCP),用于从www服务器传 ...