ipaddr
发表于 2005-11-30 12:04
建议你重装源代码安装apache+php
另外,
你找不到apxs,是因为你没有安装
在安装光盘上,找到httpd-devel.XXXX.rpm(好象是这个,没有的话,找apache-devel)
rpm -ivh httpd-devel.xxx.rpm
就会有apxs
yuhuohu
发表于 2008-12-17 11:19
不行 安装了 httpd-devel和其相关的依赖包,编译php还是提示
./configure --prefix=/usr/local/php5 --with-config-file-path=/etc/php/ --with-apxs2=/usr/sbin/apxs --with-gd --with-jpeg-dir --with-ttf --with-zlib-dir --with-png-dir --with-mysql
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking whether to enable Apache charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS...
Sorry, I cannot run apxs.Possible reasons follow:
1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)
The output of /usr/sbin/apxs follows:
cannot open /httpd/build/config_vars.mk: No such file or directory at /usr/sbin/apxs line 201.
configure: error: Aborting
yuhuohu
发表于 2008-12-17 18:24
这个解决了,是我的系统不正常
但又出新问题
./configure --prefix=/usr/local/php--with-mysql=/usr --with-apxs2=/usr/sbin/apxs
正常
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE.By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
make
main/output.o: In function `php_ob_init_named':
/root/lamp/php-5.2.8/main/output.c:440: undefined reference to `php_ob_gzhandler_check'
collect2: ld returned 1 exit status
make: *** Error 1
[ 本帖最后由 yuhuohu 于 2008-12-17 21:44 编辑 ]
yuhuohu
发表于 2008-12-17 18:32
php 5.2.8
php 5.1.6
都试过了 都一样的问题
[ 本帖最后由 yuhuohu 于 2008-12-17 21:44 编辑 ]
yuhuohu
发表于 2008-12-17 18:51
现在的新问题是
在apache的配置文件httpd.conf中加入
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
....
启动apache报错
Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: undefined symbol: sapi_globals
很接近成功了,各路高手帮忙看看撒~
yuhuohu
发表于 2008-12-17 19:27
都google到日本人的论坛去了 晕菜
[ 本帖最后由 yuhuohu 于 2008-12-17 21:45 编辑 ]
likingzi
发表于 2013-01-26 21:34
21楼是正解。
“你找不到apxs,是因为你没有安装
在安装光盘上,找到httpd-devel.XXXX.rpm(好象是这个,没有的话,找apache-devel)
rpm -ivh httpd-devel.xxx.rpm
就会有apxs”