为什么PHP无法显示(内有httpd.conf文件)

为什么PHP无法显示(内有httpd.conf文件)

为什么PHP无法显示(内有httpd.conf文件)



安装了两天的apache+mysql+php+linux不管怎么弄就是无法解释PHP文件,上网也找了很多,也没能解决,静态的可以显示出来了,PHP就不行,提示让你下载,确实没办法了.也不知道错在那里,只号把httpd.conf也帖出来让大家看看,找了几处关键的,看能不能发现那里错了没有.
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Please read the file [url="http://httpd.apache.org/docs/dso.html"]http://httpd.apache.org/docs/dso.html[/url] for more
# details about the DSO mechanism and run `httpd -l' for the list of already
# built-in (statically linked and thus always available) modules in your httpd
# binary.
#
# Note: The order in which modules are loaded is important.  Don't change
# the order below without expert advice.
#
# Example:
# LoadModule foo_module libexec/mod_foo.so
LoadModule php4_module        libexec/libphp4.so(这个是安装完以后就有的了)
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
    DirectoryIndex index.html index.php(index.php是加上去的)

# If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType applocaltion/x-httpd-php .php .php3(这个也是加上去的)
因为是看着网上的教程做的,象php.ini也是设置好了的,但就是不成功,真不知道错在那里了      
今早有来找资料看看了,从网上找到了这样一些:运行 php -i. 如果有任何问题,详细的错误信息就显示出来了,它会告诉你下一步该做什么。 如果你得到满屏的HTML代码 (phpinfo() 函数的输出), 那么PHP工作正常。
我照着运行了php -i出来了满屏的HTML代码;照理说就是我的配置的问题,但我也照着教材装了好几次了,问题到底在那里呢?
还有就是上面那个我写错了AddType applicaltion 改回来以后还是不行,      
修改配置后别忘了apachectl graceful      
顶!我也有同样的问题!大哥们帮帮忙!      
1.apache+mysql+php首先要要考虑兼容性问题,mysql-4.1.10 + httpd-2.0.54 + php-4.4.0是经过验证兼容的。不知道你用的是什么版本,我查过PHP的安装说明PHP5与apache2兼容性不好
2.安装次序是MYSQL,APACHE,PHP
3.编译APACHE时候必须包括./configure --enable-so
  编译PHP必须包括./congfigure --with-mysql  \   
             --with-apxs2=/usr/local/apache2/bin/apxs \
4.都安装完了后cp php.ini-dist /usr/local/lib/php.ini 
  即把PHP的配置文件复制到PHP指定访问的位置. /*你的问题出在这的可能性比较大*/
5.httpd.conf中加入
  AddType  application/x-httpd-php .php .phtml
  AddType  application/x-httpd-php-source .phps
  DirectoryIndex  index.php index.phtml index.html index.htm