打印

php在APACHE中不工作

php在APACHE中不工作

我刚装了FEDROA CORE 4.0,包括了APACHE SERVER 2.0和PHP.我试运行了APACHE SERVER,可以成功的看到测试页,但是无法识别PHP文件.我写了一个短的INDEX.PHP文件,内容如下:
<?php
phpinfo();
?>
但系统显示如下:
403 Forbidden

You don't have permission to access /index.php on this server.
Apache/2.0.54 (Fedora) Server at zhang-linux Port 80

我检查了/etc/httpd/conf/httpd.conf,for php,文件中包含一行:
Include conf.d/*.conf
在/etc/httpd/conf.d/php.conf中,内容包括:
LoadModule php5_module modules/libphp5.so
AddHandler php5-script .php
AddType text/html .php
DirectoryIndex index.php
AddType application/x-httpd-php-source .phps

请各位老大帮我看一下,哪里有问题.我已经disable firewall and SElinux.

TOP

php.conf文件配置的都没有问题

你的index.php放在哪个路径下呢?

权限问题

TOP

index.html和index.php都在/var/www/manual目录下,有同样的权限.
#ls -l index*
-rwxrwxrwx  1 root root  603 2005-02-20  index.html
-rw-r--r--  1 root root 7517 2005-02-20  index.html.de
-rw-r--r--  1 root root 7434 2005-02-20  index.html.en
-rw-r--r--  1 root root 7815 2005-03-31  index.html.es
-rw-r--r--  1 root root 7624 2005-02-27  index.html.fr
-rw-r--r--  1 root root 7431 2005-02-20  index.html.ja.euc-jp
-rw-r--r--  1 root root 7164 2005-02-20  index.html.ko.euc-kr
-rw-r--r--  1 root root 7487 2005-02-20  index.html.ru.koi8-r
-rwxrwxrwx  1 root root   20  3月  8 00:26 index.php

TOP

/var/www/manual
对应的是 127.0.0.1/manual ?
不想要 ID 了请找我。

TOP

我用的是缺省的,没做对应修改?

TOP

chown -R apache /var/www/manual
chgrp -R apache /var/www/manual

TOP

应该是在/var/www/html下吧。
ccat

TOP

你把httpd.conf贴出来,
----------------------------
醉醉醒醒
忽然有一种默默的赎罪
一路痴迷 我一路追

TOP