好久不没弄 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的更多相关文章

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

    一个Joomla!程序,之前是在win上的xampp上运行得非常好的,当我把它拿到mac下面的xampp上去运行的时候,发现有问题,没法运行,报以下的错误: Access forbidden!  Yo ...

  2. Forbidden You don't have permission to access / on this server. You don't have permission to access /phpmyadmin/ on this server. 解决办法

    Forbidden  You don't have permission to access / on this server.   解决办法 打开 httpd.conf 文件, 将 #   onli ...

  3. WAMP error: Forbidden You don't have permission to access /{you_app_name} on this server

    Forbidden You don't have permission to access /{you_app_name}on this server. 需要修改两处: wamp\bin\apache ...

  4. PHP错误:Forbidden You don't have permission to access / on this server.

    今天在测试一个php程序的时候,发现这个问题: Forbidden You don't have permission to access / on this server. 开始的时候我是用http ...

  5. Forbidden You don't have permission to access / on this server.

    原文:Forbidden You don't have permission to access / on this server. Forbidden You don't have permissi ...

  6. php多站点配置以及Forbidden You don't have permission to access / on this server问题解决

    php多站点配置以及Forbidden You don't have permission to access / on this server问题解决 一.总结 一句话总结:我的问题是php的版本问 ...

  7. wamp网站Forbidden You don't have permission to access

    Forbidden You don't have permission to access   问题原因:apache的2.4的版本中 Require all denied 应该变成Require a ...

  8. Forbidden You don't have permission to access XXX on this server

    Forbidden You don't have permission to access / on this server. 找到 apache 配置文件 httpd.conf 把里面的 <D ...

  9. Forbidden You don't have permission to access /phpStudyTest/application/index/controller/Index.php on this server.

    发生情况:将thinkPHP从官网上下了  http://thinkphp.cn 然后安装了phpstudy和PHPstorm,并将thinkPHP解压到www路径下 在用PHPstorm打开 thi ...

随机推荐

  1. window.onload、DOMContentLoaded和$(document).ready()

    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="C ...

  2. ListView到顶部不可再拉

    ListView到顶部不可再拉,主要针对魅族.索爱等手机: 如果你的程序针对的是2.3及以上版本,可以直接调用AbsListView的setOverScrollMode方法来解决这个问题. 如果还要兼 ...

  3. go语言让windows发出声音,或者播放音乐

    go语言让windows发出声音,或者播放音乐的例子:会发出alert警告的声音 ( 这是我应群员的求助写的, 如果你需要了解其中的调用原理或过程 或更多go语言调用win32api的资料,加群: 2 ...

  4. IOS开发官方文档随笔

    马上着手开发IOS应用程序 创建第一个单视图应用 ###main 方法 int main(int argc, char * argv[]) { @autoreleasepool { return UI ...

  5. redis 原子增一的妙用

    有这样一个需求,插入数据库之前需要了解数据库ID号,考虑到不同的主机怎么去协同这个ID呢 同时要保证每个主机分到不同的ID号,这个比较麻烦,如果独立开一个服务来一个C/S操作比较麻烦,幸好REDIS提 ...

  6. 用GO扫描图片像素,复制图片

    关键是使用image.image/png.image/color包 // main.go package main import ( "fmt" "bufio" ...

  7. AIX上通过IPSEC进行IP包过滤

    AIX上的IPSEC 在AIX可以通过以下步骤打开IP Security smitty ipsec4 --> Start/Stop IP Security --> Start IP Sec ...

  8. Advanced SystemCare 系统优化软件

    这是一款国外非常流行的系统优化软件,功能很全面,而且中文版用起来也没有语言障碍. Pro版: C0184-8F31F-4B337-296F7 8DE4A-352D9-B4531-D60F7 5B91B ...

  9. Docker-Dockerfile格式

    1.FROM //指定基于那个基础镜像 格式FROM<image>或者FROM<image>:<tag> 例如: FROM centos FROM centos:l ...

  10. sql语句 decimal(18,0)什么意思

    decimal(18,0)18是定点精度,0是小数位数.decimal(a,b)a指定指定小数点左边和右边可以存储的十进制数字的最大个数,最大精度38.b指定小数点右边可以存储的十进制数字的最大个数. ...