我的apache为什么不能解释PHP??

我的apache为什么不能解释PHP??

我先装了mysql,又装了PHP,然后是apache
装apache时用了./configure --enable-module=src/modules/php4/libphp4.a
装好后却不能解释PHP
一本书上说./configure --activate-module=src/modules/php4/libphp4.a
可是出错说没有activate这个参数
这是为什么呢?怎么才能激活PHP功能呢?
你的apache里头没有php的modules.
编译apache前已经装过PHP了,
再在编译apache时加这个参数不行吗?
我看了apache的conf,里面有很多module,但是没有php
不知道为什么。
怎么才能把PHP的module加进去呢?
你装的什么版本啊?
在apache的。httpd.conf中加入
AddType application/x-httpd-php .php .php3 .inc .phtml
AddType application/x-httpd-php-source .phps
试试。
你的apache版本不明,所以我只能用猜的。
apache2:
安装方法:
引用:
1.  gzip -d httpd-2_0_NN.tar.gz
2.  tar xvf httpd-2_0_NN.tar
3.  gunzip php-NN.tar.gz
4.  tar -xvf php-NN.tar
5.  cd httpd-2_0_NN
6.  ./configure --enable-so
7.  make
8.  make install

    Now you have Apache 2.0.NN available under /usr/local/apache2,
    configured with loadable module support and the standard MPM prefork.
    To test the installation use your normal procedure for starting
    the Apache server, e.g.:
    /usr/local/apache2/bin/apachectl start
    and stop the server to go on with the configuration for PHP:
    /usr/local/apache2/bin/apachectl stop.

9.  cd ../php4-NN
10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs
11. make
12. make install
13. cp php.ini-dist /usr/local/lib/php.ini

    Edit your php.ini file to set PHP options. If
    you prefer this file in another location, use
    --with-config-file-path=/path in step 10.

14. Edit your httpd.conf file and check that these lines are
    present:
  
   LoadModule php4_module modules/libphp4.so
   AddType application/x-httpd-php .php

  You can choose any extension you wish here. .php is simply the one
  we suggest.

  The path on the right hand side of the LoadModule statement must point
  to the path of the PHP module on your system. The above statement is
  correct for the steps shown above.

15. Use your normal procedure for starting the Apache server, e.g.:
   /usr/local/apache2/bin/apachectl start
apache1.x:

安装方法(as statitic installtion):
引用:
tar vxzf php-4.x.x
tar vxzf apache1.x
先配置apache
cd apache1.x
./configure
(不要make)
cd ../php-4.x.x
./configure --with-apache=../apache1.x --with-mysql
make
make install
cd ../apache1.x
再配置一次
./configure --activate-module=src/modules/php4/libphp4.a
make
make install
另外,apache2中configure没有--activate-module,倒有个--with-module,不知道是不是一样的
我刚刚用了apache1.3.27的dynamic installation
用./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs ; make
装PHP4出错,可能是因为这个而不能产生libphp4.so,php也装不上,这是怎么回事呢?