Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2809434
  • 博文数量: 587
  • 博客积分: 6356
  • 博客等级: 准将
  • 技术积分: 6410
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-23 10:54
个人简介

器量大者,福泽必厚

文章分类

全部博文(587)

文章存档

2019年(3)

2018年(1)

2017年(29)

2016年(39)

2015年(66)

2014年(117)

2013年(136)

2012年(58)

2011年(34)

2010年(50)

2009年(38)

2008年(16)

分类: LINUX

2013-04-28 20:10:54

1:php5.3.24 版本的和php5.2.*版本的编译参数不同
我在php5.2.*中使用的编译参数如下:
./configure  --prefix=/usr/local/php  --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config  --with-iconv-dir --with-freetype-dir  --with-jpeg-dir --with-png-dir   --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode  --enable-bcmath --enable-shmop  --enable-sysvsem  --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi  --enable-force-cgi-redirect  --enable-mbstring  --with-mcrypt --with-gd  --enable-gd-native-ttf  --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl  --with-xmlrpc --enable-zip --enable-soap --with-apxs2=/usr/local/apache/bin/apxs
当我同样将该参数放到php5.3.24下编译有如下提示:
在configure php5.3.24时发现
Notice: Following unknown configure options were used:

--enable-discard-path
--enable-fastcgi
--enable-force-cgi-redirect


Check './configure --help' for available options
confiugre里面没有这几个参数了!
2:make test时出错:
[root@centos5xen php-5.3.24]# make test


Build complete.
Don't forget to run 'make test'.

Warning: putenv(): Safe Mode warning: Cannot set environment variable 'SSH_CLIENT' - it's not in the allowed list in /home/liuxiaojie/php-5.3.24/run-tests.php on line 98

Warning: putenv(): Safe Mode warning: Cannot set environment variable 'SSH_AUTH_SOCK' - it's not in the allowed list in /home/liuxiaojie/php-5.3.24/run-tests.php on line 99
Warning: putenv(): Safe Mode warning: Cannot set environment variable 'SSH_TTY' - it's not in the allowed list in /home/liuxiaojie/php-5.3.24/run-tests.php on line 100
Warning: putenv(): Safe Mode warning: Cannot set environment variable 'SSH_CONNECTION' - it's not in the allowed list in /home/liuxiaojie/php-5.3.24/run-tests.php on line 101
Warning: set_time_limit(): Cannot set time limit in safe mode in /home/liuxiaojie/php-5.3.24/run-tests.php on line 104
+-----------------------------------------------------------+
|                       ! WARNING !                         |
| You are running the test-suite with "safe_mode" ENABLED ! |
|                                                           |
| Chances are high that no test will work at all,           |
| depending on how you configured "safe_mode" !             |
+-----------------------------------------------------------+


ERROR: invalid PHP executable specified by TEST_PHP_EXECUTABLE  = /home/liuxiaojie/php-5.3.24/sapi/cli/php
 
解决方法:
这个错误可以忽略,直接make install 即可!

3:安装memcache时遇到的问题
安装php扩展memcache时遇到问题:
checking target system type... i686-pc-linux-gnu
configure: error: Cannot find php-config. Please use --with-php-config=PATH
解决方法:
./configure --with-php-config=/usr/local/php/bin/phpconfig

4:configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决方法:
yum -y install libmcrypt-devel

5:onfigure: error: Please reinstall libmhash - I cannot find mhash.h
解决方法:yum -y install mhash-devel

6:php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file
解决方法:
echo "/usr/local/mysql/lib" >>/etc/ld.so.confs
ldconfig -v 即可

7:Cannot load modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: unixd_config
原因:php5.2的版本和httpd-2.4 不匹配!
老外的两个回答如下:
The reason you're having this issue is because it seems PHP 5.2 isn't compatible with Apache 2.4 because it's using a (now) deprecated Apache API. The developers at PHP 
are no longer supporting 5.2, and thus it is unlikely that there will be any updates to rectify this in the future.Your options are to either change PHP versions, or remain at Apache 2.2.
 


Hi,
I guess that the the php version you're trying to install is not aware of the changes made in apache-2.3.x
Why don't you try to install the latest php-5.3.9 instead of the old 5.2.17 that is no longer supported.


 
8:
configure: error: Cannot find ldap libraries in /usr/lib.
其实我相关软件已经安装了:
[root@localhost ~]# rpm -qa | grep ldap
openldap-2.4.23-32.el6_4.x86_64
openldap-devel-2.4.23-32.el6_4.x86_64
[root@localhost ~]# 

解决方法:
cp -frp /usr/lib64/libldap* /usr/lib/

9:/bin/sh: /home/liuxiaojie/install/php-5.3.24-src/build/shtool: Permission denied
/bin/sh: -d: command not found
make: *** [ext/phar/phar.php] Error 127

解决方法:

[root@localhost build]# pwd
/home/liuxiaojie/install/php-5.3.24-src/build
[root@localhost build]# chmod  a+x shtool 
[root@localhost build]# 

10:chmod: cannot access `ext/phar/phar.phar': No such file or directory
[root@localhost php-5.3.24-src]# make
Generating phar.phar
chmod: cannot access `ext/phar/phar.phar': No such file or directory
make: [ext/phar/phar.phar] Error 1 (ignored)


Build complete.
Don't forget to run 'make test'.


解决方法:
此处可以忽略,但可以解决:
解决方法:如下
/home/liuxiaojie/install/php-5.3.24-src/ext/phar
cp  phar.php  phar.phar

11:configure: error: mcrypt.h not found. Please reinstall libmcrypt. ##安装mcrypt扩展时报错
解决方法:
   tar zxvf libmcrypt-2.5.8.tar.gz 
    cd libmcrypt-2.5.8
    ./configure 
    make
    make install
12:configure: error: not found. Please reinstall the expat distribution.
其实已经安装了expat 和expat-devel
解决方法:
ln -sv /lib64/libexpat.* /lib/
ln -sv /usr/lib64/libexpat.* /usr/lib/

13:configure php时报错如下:
-bash: ./configure: Permission denied: 
解决方法:
chmod a+x configure

14:configure: error: Unable to locate gmp.h:
解决方法:
yum -y install gmp-devel

15:Cannot find config.m4.
[root@localhost install]# /usr/local/webserver/php/bin/phpize 
Cannot find config.m4. 
Make sure that you run '/usr/local/webserver/php/bin/phpize' in the top level source directory of the module
故障原因:
目录的位置错了, 应该在APC-1.*所在的目录

16: ##转载的,试过了,确实可以解决问题

/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_pvt_opt_on@@OPENLDAP_2.4_2'
/usr/bin/ld: note: 'ber_pvt_opt_on@@OPENLDAP_2.4_2' is defined in DSO /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 so try adding it to the linker command line
/usr/lib/x86_64-linux-gnu/liblber-2.4.so.2: could not read symbols: Invalid operation

搜索了好久在老外的一篇文章中终于找到解决办法

-Run your configure command
-edit Makefile
-Find the line that starts with "EXTRA_LIBS ="
-Add the following to the end of the line " -llber"




阅读(12142) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~