Home >> 心情与随笔 >> php安装常见错误集

php安装常见错误集

此为本文为 服务器配置系列之二 Install php-5.3.x on linux 的续篇. 主要集中一些手动编译/运行php的常见错误
(原文链接 http://ddbiz.com/?p=881)

  1. configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
    在下面的配置中,configurate 的时候就发生了错误:

    ./configure –prefix=/usr/local/webserver/php \
    –with-libdir=lib64 \
    –with-mysqli \
    –with-gettext \
    –with-iconv \
    –disable-debug \
    –with-openssl \
    –with-zlib \
    –with-curl \
    –enable-mbstring \
    –with-gd \
    –with-zlib-dir \
    –with-jpeg-dir \
    –with-png-dir \
    –with-freetype-dir \
    –with-imap \
    –with-imap-ssl \
    –with-kerberos \
    –enable-magic-quotes \
    –enable-fpm

    这个主要是由于 IMAP扩展造成的,不过可以通过安装 libc-client-devel包来解决:

    yum install libc-client-devel

    安装好IMAP library后,在配置Php时,还要加入 –with-kerberos 。

  2. 集成mysql
    要在php中集成mysql/pdo-mysql/mysqli, 如下配置:

    ./configure –prefix=/usr/local/webserver/php –with-libdir=lib64 –with-mysql=/usr/bin/mysql_config –with-pdo-mysql=mysqlnd –with-mysqli \
    –with-gettext –with-iconv –disable-debug –with-openssl –with-zlib –with-curl –enable-mbstring –with-gd –with-zlib-dir –with-jpeg-dir \
    –with-png-dir –with-freetype-dir –with-imap –with-imap-ssl –enable-magic-quotes –enable-fpm –with-kerberos

    集成mysql的php编译环境中,有两个前提:

    1. mysql的支持库,包括下面两个(已mysql5.5CE为例):
      MySQL-shared-5.5.20-1.el6.x86_64
      MySQL-devel-5.5.20-1.el6.x86_64
    2. 如果是x64环境,需要指定 –with-libdir=lib64

(原文链接 http://ddbiz.com/?p=881)

留言/有话要说

Copyright © 2012 Dimensions Data Business. All rights reserved.
server process 14.619 seconds.
WP-Backgrounds Lite by InoPlugs Web Design and Juwelier Schönmann 1010 Wien