Compiler PHP 5.4

Ubuntu
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Compiler PHP 5.4

文章 yehlu »

https://gist.github.com/ziadoz/3130816

代碼: 選擇全部

# Install Dependencies
# sudo apt-get install build-essential
# sudo apt-get build-dep php5
sudo apt-get install libmysqlclient-dev mysql-client libcurl4-openssl-dev libgd2-xpm-dev libjpeg-dev libpng3-dev libxpm-dev libfreetype6-dev libt1-dev libmcrypt-dev libxslt1-dev bzip2 libbz2-dev libxml2-dev libevent-dev libltdl-dev libmagickwand-dev libmagickcore-dev imagemagick libreadline-dev libc-client-dev libsnmp-dev snmpd snmp libvpx-dev libxpm-dev libgmp3-dev libicu-dev libpspell-dev libtidy-dev freetds-dev unixodbc-dev librecode-dev libglib2.0-dev libsasl2-dev libgeoip-dev imagemagick libmagickcore-dev libmagickwand-dev

# Stop Apache
sudo service apache2 stop

# Cleanup Packages
sudo apt-get autoremove

# Remove Ubuntu PHP Packages
sudo apt-get remove php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-geoip php5-imagick php5-intl php5-mcrypt php5-mysql php5-xdebug php5-xsl

# Remove PECL Packages
sudo pecl uninstall apc
sudo pecl uninstall geoip
sudo pecl uninstall xdebug

# Get PHP 5.4.8 Source
wget -O php-5.4.8.tar.bz2 http://www.php.net/get/php-5.4.8.tar.bz2/from/this/mirror
tar jxf php-5.4.8.tar.bz2
cd php-5.4.8/

# Configure PHP Source
# Note: Use `php-config` utility to determine your existing PHP configure options.
./configure \
--prefix=/usr \
--with-apxs2=/usr/bin/apxs2 \
--with-config-file-path=/etc/php5/apache2 \
--with-config-file-scan-dir=/etc/php5/conf.d \
--build=x86_64-linux-gnu \
--host=x86_64-linux-gnu \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--disable-debug \
--with-regex=php \
--disable-rpath \
--disable-static \
--with-pic \
--with-layout=GNU \
--with-pear=/usr/share/php \
--enable-calendar \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-bcmath \
--with-bz2 \
--enable-ctype \
--with-db4 \
--without-gdbm \
--with-iconv \
--enable-exif \
--enable-ftp \
--with-gettext \
--enable-mbstring \
--with-pcre-regex=/usr \
--enable-shmop \
--enable-sockets \
--enable-wddx \
--with-libxml-dir=/usr \
--with-zlib \
--with-kerberos=/usr \
--with-openssl=/usr \
--enable-soap \
--enable-zip \
--with-mhash=yes \
--with-exec-dir=/usr/lib/php5/libexec \
--with-system-tzdata \
--without-mm \
--with-curl=shared,/usr \
--with-enchant=shared,/usr \
--with-zlib-dir=/usr \
--with-gd \
--enable-gd-native-ttf \
--with-gmp=shared,/usr \
--with-jpeg-dir=shared,/usr \
--with-xpm-dir=shared,/usr/X11R6 \
--with-png-dir=shared,/usr \
--with-freetype-dir=shared,/usr \
--enable-intl=shared \
--with-ttf=shared,/usr \
--with-t1lib=shared,/usr \
--with-ldap=shared,/usr \
--with-ldap-sasl=/usr \
--with-mysql=shared,/usr \
--with-mysqli=shared,/usr/bin/mysql_config \
--with-pspell=shared,/usr \
--with-unixODBC=shared,/usr \
--with-recode=shared,/usr \
--with-xsl=shared,/usr \
--with-snmp=shared,/usr \
--with-sqlite=shared,/usr \
--with-sqlite3=shared,/usr \
--with-mssql=shared,/usr \
--with-tidy=shared,/usr \
--with-xmlrpc=shared \
--with-pgsql=shared,/usr \
--enable-fpm \
--with-mcrypt \
--enable-pdo=shared,/usr \
--with-pdo-mysql=shared,/usr \
--with-pdo-sqlite=shared,/usr \
--with-pdo-pgsql=shared,/usr \
--with-curlwrappers \
--enable-json \
--enable-shared \
--enable-mysqlnd=shared \

# Install PHP
make
make test
sudo make install

# Update PEAR and Install PECL Packages
sudo pear update-channels
sudo pecl install apc 
sudo pecl install geopip
sudo pecl install xdebug

# Install Imagick RC2
wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar xvfz imagick-3.1.0RC2.tgz
cd imagick-3.1.0RC2
phpize
./configure --prefix=/usr/lib --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes
make
sudo make install

# Install XDebug 2.2.1
wget http://xdebug.org/files/xdebug-2.2.1.tgz
tar xvfz xdebug-2.2.1.tgz
cd xdebug-2.2.1
phpize
./configure --enable-xdebug
make
sudo make install

# Update PHP INI Extensions
# Use `php-m` to see a list of active modules.
sudo rm /etc/php5/conf.d/mcrypt.ini
sudo rm /etc/php5/conf.d/gd.ini
sudo echo 'extension=imagick.so' | sudo tee /etc/php5/conf.d/xdebug.ini
sudo echo 'zend_extension_ts=xdebug.so' | sudo tee /etc/php5/conf.d/xdebug.ini

# Start Apache
sudo service apache2 start
sudo apt-get install apache2-prefork-dev
sudo apt-get install libenchant-dev
sudo apt-get install g++ build-essential
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Re: Compiler PHP 5.4

文章 yehlu »

=====================================================================
TIME END 2013-08-09 07:07:03

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 12
Exts tested : 66
---------------------------------------------------------------------

Number of tests : 12498 10450
Tests skipped : 2048 ( 16.4%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 15 ( 0.1%) ( 0.1%)
Expected fail : 37 ( 0.3%) ( 0.4%)
Tests passed : 10398 ( 83.2%) ( 99.5%)
---------------------------------------------------------------------
Time taken : 1227 seconds
=====================================================================

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Test script to verify that magic methods should be called only once when accessing an unset property. [tests/classes/bug63462.phpt] XFAIL REASON: Bug 63462 is not yet fixed
Test open_basedir configuration [tests/security/open_basedir_linkinfo.phpt] XFAIL REASON: BUG: open_basedir cannot delete symlink to prohibited file. See also
bugs 48111 and 52176.
Inconsistencies when accessing protected members [Zend/tests/access_modifiers_008.phpt] XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Inconsistencies when accessing protected members - 2 [Zend/tests/access_modifiers_009.phpt] XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770.phpt] XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_2.phpt] XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_3.phpt] XFAIL REASON: See Bug #48770
Bug #63336 (invalid E_NOTICE error occur) [Zend/tests/bug63336.phpt] XFAIL REASON: Bug is not fixed yet
Initial value of static var in method depends on the include time of the class definition [Zend/tests/method_static_var.phpt] XFAIL REASON: Maybe not a bug
DateTime::add() -- fall type2 type3 [ext/date/tests/DateTime_add-fall-type2-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type2 [ext/date/tests/DateTime_add-fall-type3-type2.phpt] XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type3 [ext/date/tests/DateTime_add-fall-type3-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::add() -- spring type2 type3 [ext/date/tests/DateTime_add-spring-type2-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type2 [ext/date/tests/DateTime_add-spring-type3-type2.phpt] XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type3 [ext/date/tests/DateTime_add-spring-type3-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type2 type3 [ext/date/tests/DateTime_diff-fall-type2-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type2 [ext/date/tests/DateTime_diff-fall-type3-type2.phpt] XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type3 [ext/date/tests/DateTime_diff-fall-type3-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type2 type3 [ext/date/tests/DateTime_diff-spring-type2-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type2 [ext/date/tests/DateTime_diff-spring-type3-type2.phpt] XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type3 [ext/date/tests/DateTime_diff-spring-type3-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type2 type3 [ext/date/tests/DateTime_sub-fall-type2-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type2 [ext/date/tests/DateTime_sub-fall-type3-type2.phpt] XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type3 [ext/date/tests/DateTime_sub-fall-type3-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type2 type3 [ext/date/tests/DateTime_sub-spring-type2-type3.phpt] XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type2 [ext/date/tests/DateTime_sub-spring-type3-type2.phpt] XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type3 [ext/date/tests/DateTime_sub-spring-type3-type3.phpt] XFAIL REASON: Various bugs exist
RFC: DateTime and Daylight Saving Time Transitions (zone type 3) [ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt] XFAIL REASON: RFC not implemented yet
DBA with persistent connections [ext/dba/tests/dba015.phpt] XFAIL REASON: Test 6 crashes in flatfile_findkey with dba pointer of NULL, bug http://bugs.php.net/bug.php?id=51278
DBA DB4 with persistent connections [ext/dba/tests/dba_db4_018.phpt] XFAIL REASON: Test 6 crashes with dba pointer of NULL, bug http://bugs.php.net/bug.php?id=51278
Bug #42718 (unsafe_raw filter not applied when configured as default filter) [ext/filter/tests/bug42718.phpt] XFAIL REASON: FILTER_UNSAFE_RAW not applied when configured as default filter, even with flags
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) [ext/session/tests/bug60634.phpt] XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write during exec [ext/session/tests/bug60634_error_1.phpt] XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write during exec [ext/session/tests/bug60634_error_2.phpt] XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write after exec [ext/session/tests/bug60634_error_3.phpt] XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write after exec [ext/session/tests/bug60634_error_4.phpt] XFAIL REASON: Long term low priority bug, working on it
Bug #45712 (NaN/INF comparison) [ext/standard/tests/math/bug45712.phpt] XFAIL REASON: Bug 45712 not fixed yet.
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
DBA DB4 File Creation open("c") with existing file [ext/dba/tests/dba_db4_003.phpt] (info: DB4 handler used)
DBA DB4 File Creation popen("c") with existing invalid file [ext/dba/tests/dba_db4_007.phpt] (info: DB4 handler used)
DBA DB4 magic_quotes_runtime Test [ext/dba/tests/dba_db4_010.phpt] (info: DB4 handler used)
Bug #64124 IPv6 malformed [ext/snmp/tests/bug64124.phpt]
Bug #64159: Truncated snmpget [ext/snmp/tests/bug64159.phpt]
IPv6 support [ext/snmp/tests/ipv6.phpt]
OO API: getErrno & getError methods [ext/snmp/tests/snmp-object-errno-errstr.phpt]
OO API [ext/snmp/tests/snmp-object.phpt]
Function snmp2_set (without MIBs loading) [ext/snmp/tests/snmp2_set-nomib.phpt]
Function snmp2_set [ext/snmp/tests/snmp2_set.phpt]
SNMPv3 Support [ext/snmp/tests/snmp3.phpt]
Function snmp_getvalue [ext/snmp/tests/snmp_getvalue.phpt]
Function snmpset (without MIBs loading) [ext/snmp/tests/snmpset-nomib.phpt]
Function snmpset [ext/snmp/tests/snmpset.phpt]
Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using UTF-* [ext/xml/tests/bug32001.phpt]
=====================================================================

You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it. You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]: Y

Please enter your email address.
(Your address will be mangled so that it will not go out on any
mailinglist in plain text):
sh: autoconf: not found

Posting to http://qa.php.net/buildtest-process.php

Thank you for helping to make PHP better.
回覆文章

回到「Ubuntu」