centos7源码安装php5.3遇到的问题及解决

XGQ 2019-11-17

make的时候报
note: in definition of macro ‘ZVAL_STRINGL’
参考 https://blog.csdn.net/kajweb/...
解决了

[root@localhost php-5.3.3]# curl -o php-5.x.x.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
[root@localhost php-5.3.3]# cd php-5.3.3
[root@localhost php-5.3.3]# patch -p0 -b < /root/php-5.x.x.patch 
[root@localhost php-5.3.3]# yum install patch
[root@localhost php-5.3.3]# patch -p0 -b < /root/php-5.x.x.patch 
[root@localhost php-5.3.3]# make clean
[root@localhost php-5.3.3]# ./configure --prefix=/usr/local/php/php53 --datadir=/usr/local/php/php53/doc --mandir=/usr/local/php/php53/man --with-config-file-path=/usr/local/php/php53/etc --with-mcrypt --with-mhash --with-openssl --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-zlib --enable-zip --disable-rpath --enable-shared --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbstring --enable-ftp --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --without-pear --with-gettext --with-curl --with-freetype-dir --enable-fpm --enable-fast-install
[root@localhost php-5.3.3]# make
[root@localhost php-5.3.3]# make install

又报错
undefined reference to `php_ob_gzhandler_check'

参考 https://bugs.php.net/bug.php?...

centos7源码安装php5.3遇到的问题及解决

[root@localhost php-5.3.3]# rm config.cache
[root@localhost php-5.3.3]# ./configure --prefix=/usr/local/php/php53 --datadir=/usr/local/php/php53/doc --mandir=/usr/local/php/php53/man --with-config-file-path=/usr/local/php/php53/etc --with-mcrypt --with-mhash --with-openssl --with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-zlib --enable-zip --disable-rpath --enable-shared --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbstring --enable-ftp --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --without-pear --with-gettext --with-curl --with-freetype-dir --enable-fpm --enable-fast-install
[root@localhost php-5.3.3]# make clean && make
[root@localhost php-5.3.3]# make install

终于可以了

相关推荐