|
|
系统是Fedora8
目前是html可以解析,但php无法解析。用IE浏览测试网页index.php一直显示HTTP 500错误。
先yum install的httpd
然后yum install php
修改了/etc/httpd/conf/httpd.conf
在文件中增加了一行
AddType application/x-httpd-php .php
修改了一行
DirectoryIndex index.php index.html index.html.var
/etc/httpd/conf.d/php.conf文件修改过
内容如下
LoadModule php5_module modules/libphp5.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
AddType application/x-httpd-php-source .phps
查看日志/var/log/httpd/error_log信息如下
[Tue Jan 22 23:13:48 2008] [notice] Apache/2.2.6 (Unix) DAV/2 PHP/5.2.4 configured -- resuming normal operations
[Tue Jan 22 23:13:51 2008] [error] [client 192.168.150.79] PHP Parse error: syntax error, unexpected '<' in /var/web/index.php on line 3
[Tue Jan 22 23:13:52 2008] [error] [client 192.168.150.79] PHP Parse error: syntax error, unexpected '<' in /var/web/index.php on line 3
写的php测试网页index.php内容如下
<?php>
phpinfo();
<?>
到底出错出在哪里呀 折腾一整天了 google了好多资料
都说有
AddType application/x-httpd-php .php
LoadModule php5_module modules/libphp5.so
这两句就可以解析php网页了
可是我的还是不能解析php网页
是不是Fedora 8 yum安装的apache+php有问题?
今天早上在Fedora Core6上试了一下 也不行。 和fedora8一个样。
请高手赐教呀 |
|