求助,apache1.3于php5.2在红帽上的问题

求助,apache1.3于php5.2在红帽上的问题

先编译安装apache_1.3.41
./configure --enable-module=so
一切顺利
apache装入默认路径 /usr/local/apache

然后php-5.2.6
编译
./configure --with-apxs=/usr/local/apache/bin/apxs
然后成功安装
然后把php.ini-dist考到/usrk/local/lib下未php.ini
然后起apache

[root@localhost ~]# /usr/local/apache/bin/apachectl start
Syntax error on line 206 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp5.so into server: /usr/local/apache/libexec/libphp5.so: undefined symbol: php_ini_opened_path
/usr/local/apache/bin/apachectl start: httpd could not be started

[root@localhost ~]# /usr/local/apache/bin/apachectl configtest
Syntax error on line 206 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp5.so into server: /usr/local/apache/libexec/libphp5.so: undefined symbol: php_ini_opened_path

查了很多资料说在compile php的时候 ,加上--without-sqlite --without-pdo-sqlite
如故
大家指点下
目前apache可以正常重启了,但是php依然没有成功解析

[bsun@localhost ~]$ ldd -r /usr/local/apache/libexec/libphp5.so
linux-gate.so.1 =>  (0x005f1000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x0091f000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00483000)
libm.so.6 => /lib/libm.so.6 (0x00496000)
libdl.so.2 => /lib/libdl.so.2 (0x0081f000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00659000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x004bd000)
libz.so.1 => /usr/lib/libz.so.1 (0x005f2000)
libc.so.6 => /lib/libc.so.6 (0x0066f000)
/lib/ld-linux.so.2 (0x4a39a000)
undefined symbol: ap_user_id (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_group_id (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_log_error (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_table_get (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_should_client_block (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_signal (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_hard_timeout (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_get_client_block (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_reset_timeout (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_send_http_header (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_send_error_response (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_pstrndup (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_pstrdup (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_table_add (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_table_set (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_rflush (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_rwrite (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_block_alarms (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_register_cleanup (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_unblock_alarms (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_add_version_component (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_server_root_relative (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_setup_client_block (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_add_common_vars (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_add_cgi_vars (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_auth_type (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_kill_timeout (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_getword (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_uudecode (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_getword_nulls_nc (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_update_mtime (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_set_last_modified (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_set_etag (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_psprintf (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_table_setn (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_loaded_modules (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_get_server_version (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_user_name (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_max_requests_per_child (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_server_root (/usr/local/apache/libexec/libphp5.so)
undefined symbol: top_module (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_child_terminate (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_sub_req_lookup_uri (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_destroy_sub_req (/usr/local/apache/libexec/libphp5.so)
undefined symbol: ap_run_sub_req (/usr/local/apache/libexec/libphp5.so)
只要选择用源码安装,不管装什么,建议你在配置时都自己指定安装目录,而不是让它默认安装.比如./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs  其中/usr/local/php就是php的安装目录,你可以自己随意指定.关键一点,php.ihi-dist应该拷贝到你的php安装目录下的lib包里,例如,我上面提到的那个安装目录,如果那样,就应该把php-ini-dist拷贝到/usr/local/php/lib 下并改名php.ini.接下来再做下面的配置,比如php.ini httpd.conf这两个文件.
我的操作步骤是楼主的一样,也出现了同样的问题,谁有解决办法呀