see
http://groups.google.com/groups?selm=4226F9%24IDf%40bbs.pku.edu.cn&oe=UTF-8&output=gplain
Apache2是apache的一个全新的branch,目录结构有些变化,
按照Apache1x + PHP4的安装方式不会成功。这里给出一个简单的安装过程:从www.apache.org获取Apache2的最新版本,这里用的是httpd-2.0.40.tar.gz
从www.php.net获取PHP4的最新版本,这里用的是PHP-4.2.2.tar.gz1.安装Apache2
tar zxvf httpd-2.0.40.tar.gz
cd httpd-2.0.40
/configure --enable-so --enable-modules=all
make
make install(缺省的安装目录为:/usr/local/apache2)2.安装PHP4
tar zxvf PHP-4.2.2.tar.gz
cd PHP-4.2.2
/configure --prefix=/usr/local/apache2 \
--with-config-file-path=/usr/local/apache2/conf
make
make install3.修改配置
在/usr/local/apache2/conf/httpd.conf中添加下面三行:ScriptAlias /php/ "/usr/local/apache2/bin/"
Action application/x-httpd-php "/php/php"
AddType application/x-httpd-php .php4.启动Apache2
/usr/local/apache2/bin/apachectl start5.测试PHP4
在Apache2的HTML文档根目录下(缺省为/usr/local/apache2/htdocs)
创建info.php文件,内容为:
<? phpinfo(); ?>用浏览器查看info.php是否正常

解决方案 »

  1.   

    php是php,apache是apache,两者之间不存在版本的冲突肯定是你配置错误,或者下载的php有问题。下载地址:http://www.php.net/download/
    http://www.apache.org/dist/httpd/
      

  2.   

    紧急求助,那位大鸟会apache2.0.4在win下的配置阿??我按照apache1.x的方法好像行不通阿!!先进的东东放在眼前却用不得!!!各位大鸟们帮帮忙吧!!!正在郁闷之中......
      

  3.   

    看看phpbuilder.com的网友提供的
    Ok I had so much fun installing php-4.2.2 I decided to try installing apache-2.0.4 also. This is how I installed them after I unpacked the files. cd /usr/local/etc/apache 
    ./configure --enable-layout=RedHat --enable-module=so 
    make 
    make install cd /usr/local/etc/php 
    ./configure --with-mysql=/usr --with-apxs2=/usr/sbin/apxs 
    make 
    make install The apache install worked fine, however the php did not. During the 'make' right at the end it displayed this; sapi_apache2.c: In function `php_register_hook': 
    sapi_apache2.c:534: warning: passing arg 3 of `ap_register_output_filter' makes pointer from integer without a cast 
    sapi_apache2.c:534: too few arguments to function `ap_register_output_filter' 
    sapi_apache2.c:535: warning: passing arg 3 of `ap_register_input_filter' makes pointer from integer without a cast 
    sapi_apache2.c:535: too few arguments to function `ap_register_input_filter' 
    make[3]: *** [sapi_apache2.lo] Error 1 
    make[3]: Leaving directory `/usr/local/etc/php-4.2.2/sapi/apache2filter' 
    make[2]: *** [all-recursive] Error 1 
    make[2]: Leaving directory `/usr/local/etc/php-4.2.2/sapi/apache2filter' 
    make[1]: *** [all-recursive] Error 1 
    make[1]: Leaving directory `/usr/local/etc/php-4.2.2/sapi' 
    make: *** [all-recursive] Error 1 I kind of ignored it to see if it would work anyway. But I get an error; Syntax error on line 232 of /etc/httpd/conf/httpd.conf: 
    Cannot load /usr/lib/apache/libphp4.so into server: /usr/lib/apache/libphp4.so: undefined symbol: ap_block_alarms I think that libphp4.so is still from apache-1.3.6 right? When does the new libphp4.so get made? Also in the apache-1.3.6 modules directory there where a lot of .so files. In apache-2.0.4 there is only one file in the modules directory, namely httpd.exp, is this correct? Thanks Carlos希望会有帮助---时间问题没有做翻译
    另,据我所知apache2.0.4和php4.2.2集成的不如老版本那么好
    浅妄薄见,望与斟酌
      

  4.   

    在 PHP 4.2.2 的包里的 news.txt 里唯一和 Apache2 有关的是这么一句- Note: Apache2 support is EXPERIMENTAL.