LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1005|回复: 0

为什么我的apache个人目录中无法解析php文件?

[复制链接]
发表于 2003-12-26 13:34:04 | 显示全部楼层 |阅读模式
整了一个晚上还没搞定,郁闷……

1、服务器本来可以正常解析php文件,php已经安装为apache的dso
2、我的个人目录是/home/www/public_html
3、通过http://localhost/~www/来执行cgi文件一切正常
4、如果php文件的属性不改为777的话,就会提示没有权限访问这个文件,
如果改为777,则提示“Internal Server Error”
5、apache日志中有如下记录:

[Web Dec 24 10:22:08 2003] [error] (8)Exec format error: exec of /home/www/public_html/index.php failed
[Web Dec 24 10:22:08 2003] [error] [client 192.168.0.1] Premature end of script headers: /home/www/pulic_html/index.php

6、apache中关于用户目录设置如下:
<Directory /home/*/public_html>
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI
SetHandler cgi-script
DirectoryIndex index.php
AllowOverride None
Order allow,deny
Allow from all

<Limit GET POST OPTIONS PROFRIND>
Order allow,deny
Allow from all
</Limit>

<Limit PUT DELETE PATCH PROPPATCH MKCOL COP MOVE LOCK UNLOCK>
Order deny,allow
Deny from all
</Limit>
</Directory>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表