返回列表 回复 发帖

关于apache解析php的问题

我装上apache和php后
在/usr/local/apache/conf/httpd.conf
加了
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php .php3
#AddType application/x-httpd-php .phtml
#AddType application/x-httpd-php-source .phps

运行# cd /etc/init.
    # ./httpd start
出现
[warn] module php4_module is already loaded, skippinghttpd (pid 25911) already running

而我输入192.168.**.**/test.php,显示此文档无数据

之前, 我也输入过, 显示
  <?php
    phpinfo();
  ?>

呵呵,请问各位XDJM们,这是什么原因呢?谢谢各位朋友!!
可能在apache的httpd.conf里加载了两次php模块.请你看看这个配置文件,有没有出错!@
warn问题已解决,非常谢谢lock!!

呵呵,还有一问题,就是我输入192.168.**.**/test.php
显示的内容为
  <?php
    phpinfo();
  ?>

按理说,应该显示一些系统apache和php的信息,但显示的是test.php的内容
是不是我的apache还需配置一下啊?那该怎样配置呢?
原帖由 sunljh 于 2007-4-15 22:58 发表
我装上apache和php后
在/usr/local/apache/conf/httpd.conf
加了
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php .php3
#AddType application/x-httpd-php .phtml
#AddType ap ...
为什么前边要加#注释掉?
呵呵,去掉#后
输入192.168.**.**/test.php
还是显示
  <?php
    phpinfo();
  ?>


#cd /usr/local/bin
# php -i
显示:
phpinfo()
PHP Version => 4.4.2

System => Linux liujianghong 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686
Build Date => Apr 16 2007 11:42:11
Configure Command =>  './configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql' '--with-gd' '--with-zlib' '--with-png' '--with-jpeg-dir=/usr/' '--with-freetype-dir=/usr/local/freetype' '--with-ttf' '--enable-sockets'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/lib
......
呵呵,问题已解决
非常谢谢lock,phpman,grassofhust几位朋友!!
返回列表