升级wdcp中apache的php到5.3.29

下载php5.3.29
http://cn2.php.net/get/php-5.3.29.tar.bz2/from/this/mirror

编译
'./configure' '--prefix=/www/wdlinux/apache_php-5.3.29' '--with-config-file-path=/www/wdlinux/apache_php-5.3.29/etc' '--with-mysql=/www/wdlinux/mysql/include/mysql' '--with-iconv' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-inline-optimization' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--with-mcrypt=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-ftp' '--with-apxs2=/www/wdlinux/apache/bin/apxs' '--enable-zip' '--with-pdo-mysql' '--with-mysqli' '--enable-exif' '--enable-calendar' '--enable-shared'

make && make install

拷贝配置文件
cp php.ini-production /www/wdlinux/apache_php-5.3.29/etc/php.ini

修改配置文件
extension_dir = "/www/wdlinux/apache_php-5.3.29/lib/php/extensions/"

open_basedir = /www/web/:/tmp/

zend_extension=/www/wdlinux/apache_php-5.3.29/lib/php/Zend/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3

重新链接php路径
ln -s  /www/wdlinux/apache_php-5.3.29 apache_php

下载zend Guard
php5.3
http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz

注:
/www/wdlinux/httpd-2.2.22/modules/libphp5.so文件在编译前进行备份,php编译时会覆盖此文件

Centos下编译出错的解决方法整理

编译时候错误的解决方法
configure: error: freetype.h not found.
yum install freetype-devel

configure: error: Please reinstall libmhash – I cannot find mhash.h
yum install mhash-devel

configure: error: Cannot find pspell
yum install pspell-devel

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
yum install libc-client-devel

configure: error: Directory /usr is not a FreeTDS installation directory
yum install freetds-devel

checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
yum install unixODBC-devel

configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
yum install postgresql-devel

configure: error: Please reinstall the libcurl distribution – easy.h should be in <curl-dir>/include/curl/
yum install curl-devel

configure: error: SNMP sanity check failed. Please check config.log for more information.
yum install net-snmp net-snmp-devel

configure: error: libjpeg.(a|so) not found.
yum install libjpeg-devel
再一种在64位系统中找不到文件需要添加参数-with-libdir=lib64

configure: error: xml2-config not found. Please check your libxml2 installation.
yum install libxml2-devel

configure: error: Please reinstall the BZip2 distribution
yum install bzip2-devel

configure: error: jpeglib.h not found.
yum install libjpeg-devel

configure: error: png.h not found.
yum install libpng-devel

configure: error: mcrypt.h not found. Please reinstall libmcrypt.
yum install libmcrypt-devel

configure: error: Please reinstall the BZip2 distribution
yum install bzip2-devel

configure: error: DBA: Could not find necessary header file(s).
yum install db4-devel

configure: error: Please reinstall the libcurl distribution – easy.h should be in /include/curl/
yum -y install curl-devel

checking for QDBM support… no
configure: error: DBA: Could not find necessary header file(s).
yum -y install gdbm-devel