打印

lnmp之安装PHP模块(不需要重装PHP)

我的经验:
第一次,刚开始就错在编译上
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
解决办法:
在确实libc-cleint 已经安装成功的前提下,做一个链接,ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
第二次,执行,增加--with -kerberos
configure: error: This c-client library is built with SSL support.

      Add --with-imap-ssl to your configure line. Check config.log for details.
第三次,执行,./configure --with-php-config=/usr/local/php/bin/php-config --with-imap-ssl --with-kerberos
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h

开始MAKE    #make && make install
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

TOP

[root@x-phpFAQ-01 imap]# make test

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


+--------------------------------------------------------------+
|                       ! ERROR !                                           |
| The test-suite requires that proc_open() is available.         |
| Please check if you disabled it in php.ini.                       |
+--------------------------------------------------------------+


先备份php.ini文件,再修改php.ini文件,将disable列表中的proc_open功能删除

再执行make test
[root@x-phpFAQ-01 imap]# make test

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

PHP Warning:  putenv(): Safe Mode warning: Cannot set environment variable 'SSH_CLIENT' - it's not in the allowed list in /root/lnmp1.0-full/php-5.3.17/ext/imap/run-tests.php on line 98
PHP Warning:  putenv(): Safe Mode warning: Cannot set environment variable 'SSH_AUTH_SOCK' - it's not in the allowed list in /root/lnmp1.0-full/php-5.3.17/ext/imap/run-tests.php on line 99
PHP Warning:  putenv(): Safe Mode warning: Cannot set environment variable 'SSH_TTY' - it's not in the allowed list in /root/lnmp1.0-full/php-5.3.17/ext/imap/run-tests.php on line 100
PHP Warning:  putenv(): Safe Mode warning: Cannot set environment variable 'SSH_CONNECTION' - it's not in the allowed list in /root/lnmp1.0-full/php-5.3.17/ext/imap/run-tests.php on line 101
PHP Warning:  set_time_limit(): Cannot set time limit in safe mode in /root/lnmp1.0-full/php-5.3.17/ext/imap/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  = /usr/local/php/bin/php
附件: 您所在的用户组无法下载或查看附件

TOP