码迷,mamicode.com
首页 > 数据库 > 详细

Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server

时间:2016-03-02 20:06:40      阅读:836      评论:0      收藏:0      [点我收藏+]

标签:

好久不没弄 apache和php了,突然遇到这种奇葩的问题,本来想直接在网上找现成的解决思路,结果网上搜索花了不少功夫,也没找到原因。

后来看日志文件:apache\logs\error.log发现了蛛丝马迹。

[core:error] [pid 200:tid 1704] (20024)The given path is misformatted or contained invalid characters: [client 127.0.0.1:51040] AH00127: Cannot map GET /.../%3C?%20echo%20$url%20?%3E HTTP/1.1 to file, referer:

讲 

%3C?%20echo%20$url%20?%3E
解码后,我心里就有数了。

<? echo $url ?>

大概是没有启用php的short_open_tag。

打开php\php.ini修改short_open_tag = On,重启apache,测试就没问题了。


Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server

标签:

原文地址:http://www.cnblogs.com/yelaiju/p/5236051.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!