<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. webpack入门(五)webpack CLI

    webpack的CLI安装和命令 Installation $ npm install webpack -g The webpack command is now available globally ...

  2. 如何搭建高可用redis架构?

    如何搭建高可用redis架构? 温国兵 架构师小秘圈 昨天 作者:温国兵,曾任职于酷狗音乐,现为三七互娱 DBA.目前主要关注领域:数据库自动化运维.高可用架构设计.数据库安全.海量数据解决方案.以及 ...

  3. php关联Apache和nginx

    编辑apache配置文件httpd.conf,以apache支持php vim /etc/httpd/httpd.conf添加如下二行 AddType application/x-httpd-php ...

  4. POJ 3268 Silver Cow Party (Dijkstra)

    Silver Cow Party Time Limit: 2000MS   Memory Limit: 65536K Total Submissions:28457   Accepted: 12928 ...

  5. 记cccc天梯赛第三届决赛

        首先我很想知道,为什么我没有参加初赛,就可以去决赛,这个究竟有没有初赛,这真是未解之谜.     其次,会长说得不错,菜是原罪.不知道这次的表现能不能把我送去湘潭挑战赛....     我身边 ...

  6. position:fixed固定定位的用法

    一.position:fixed:固定定位 1.实现某个元素在可视窗口的居中位置显示 1)给自身设置宽高: 2)给自身加position:fixed: 3)用margin向左移动自身宽度的一半,向上移 ...

  7. (二叉树 BFS DFS) leetcode 111. Minimum Depth of Binary Tree

    Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shor ...

  8. Qt ------ 添加某个功能,比如(QSerialPort)注意事项

    添加某个功能,比如(QSerialPort),不仅需要保护头文件 还需要在.pro文件内添加 QT += serialport

  9. CentOS Bash 命令补全增强软件包 bash-completion

    引言 之前安装的 CentOS 7 是最小化安装,在使用 systemctl 命令进行服务的管理时,经常手动输入相关服务名.如果对一个服务名称不熟悉,这样可以迫使我们记住它,但如果对一个服务名已经很熟 ...

  10. docker-compose 案例

    官网示例: 安装wordpress version: " services: db: image: mysql:5.7 volumes: - db_data:/var/lib/mysql r ...