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

好久不没弄 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

时间: 2024-08-10 02:46:48

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

mac上的xampp出现Access forbidden! You don’t have permission to access the requested object. It is either

一个Joomla!程序,之前是在win上的xampp上运行得非常好的,当我把它拿到mac下面的xampp上去运行的时候,发现有问题,没法运行,报以下的错误: Access forbidden!  You don't have permission to access the requested object. It is either read-protected or not readable by the server. 这时可以找到apache的httpd.conf文件,找出<Direct

Forbidden You don&#39;t have permission to access / on this server

Apache: Forbidden You don't have permission to access / on this server 度娘了半天,屁用都没,都是老掉牙的. 最后google之,http://stackoverflow.com/questions/21551840/forbidden-you-dont-have-permission-to-access-on-this-server Found my solution thanks to Error with .htacce

wdcp v3 Forbidden :You don&#39;t have permission to access /phpmyadmin on this server

First edit the file /www/wdlinux/apache/conf/vhost/00000.default.conf and add the additional line to the directory settings: <Directory /www/web/default/> order deny,allow deny from all allow from 127.0.0.1 allow from 192.168.1.0/15 </Directory&g

Apache error: 403 Forbidden You don&#39;t have permission to access

CentOS 6 solution: chcon -t httpd_sys_content_t -R /directory refer to: https://www.centos.org/forums/viewtopic.php?f=19&t=15128&start=10#p70999 Apache error: 403 Forbidden You don't have permission to access

mac osx Forbidden You don&#39;t have permission to access / on this server解决方法

(1)首先查看*.conf 是否有读写权限,如果没有要将文件赋予读写权限,比如 sudo chmod 777 localhost.conf (2)再查看/Users/username/Sites/localhost/文件夹是否有index.html文件,没有的话,创建一个,默认是打开index.html文件 (3)最后查看localhost配置文件 对于OSX 10.9 Apache 2.2 <VirtualHost *:80> DocumentRoot "/Users/xx/Sit

[php排错] Forbidden You don&#39;t have permission to access / on this server.

刚开始接触PHP,在搭建完环境后发现输入127.0.0.1可以访问界面,但是输入http://localhost却提醒无权访问,在百度之后发现是php中的httpd.conf的作用 在wamp中搜索发现有两个httpd.conf,于是把两个都改了,然后重启服务发现可以访问了,方法如下: <Directory />    Options FollowSymLinks    AllowOverride None    Order deny,allow    Deny from all</Di

HTTP错误:Forbidden You don&#39;t have permission to access …… on this server.

1.出现这种错误,一般用的web服务器是Apache 2.找到:apache配置文件,打开httpd.conf 文件,做如下修改: 第一处:找到 <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all Satisfy all </Directory> 修改成 <Directory /> Options FollowSymLinks AllowOverri

server下apache2.4.*虚拟主机配置Forbidden You don&#39;t have permission to access / on this server.

前言: 继前面两节笔记之后,在配置一个虚拟主机时,这中间却遇见了一个问题,这里需要描述做一下笔记,刚刚安装的是Ubuntu server,apt-get下来的apache的版本是2.4.7,之前一直用的是apache2.2的,期间遇见过403错误,只是问题处理的方式方法有些不一样,于是这里就一时没有找到头绪.本文原创博客地址:http://www.cnblogs.com/unofficial官网地址:www.pushself.com) 403:没有权限访问 不说废话直接找主题: 首先我们来回顾一

PHP错误:Forbidden You don&#39;t have permission to access / on this server.

原文:PHP错误:Forbidden You don't have permission to access / on this server. 今天老大让在xp下搭建一个FTP服务器,一波三折,最后终于在老大的帮助下搞定了... 其中通过ip访问的时候 提示 Forbidden You don't have permission to access / on this server. 找到一个解决方法,特此记录 php的配置文件httpd.conf. 在原有的位置文件中找到配置节 <Direc