PHP7.0 Installation Notes Finishing _php instances

Source: Internet
Author: User
Tags mcrypt php website sapi
June 11, 2015, the PHP official website released a message, officially released PHP7 first version of the Alpha version.

PHP7 Features:

PHP 7.0.0 Alpha 1 uses the new version of the Zendengine engine, which brings a number of features, the following is an incomplete list:

(1) Performance improvement: PHP7 twice times higher than PHP5.6 performance. Improved performance:php 7 is up to twice as fast as PHP 5.6

(2) Full and consistent 64-bit support. Consistent 64-bit Support

(3) Many of the previous fatal errors are now changed to throw exceptions. Many fatal errors is now Exceptions

(4) Remove some old SAPI (server-side application programming ports) and extensions that are not supported. Removal of old and unsupported Sapis and extensions

(5) Added an empty join operator. The null coalescing operator (??)

(6) Added a new combination of comparison operators. Combined comparison Operator (<=>)

(7) The new return type declaration of the function is added. Return Type Declarations

(8) A new scalar type declaration has been added. Scalar Type Declarations

(9) newly added anonymous class. Anonymous Classes

PHP7 Installation Notes Finishing

# Install MCrypt

Yum install-y php-mcrypt Libmcrypt libmcrypt-devel

# Upgrade Bison

Cd/var/soft/wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gztar-xvzf bison-2.6.4.tar.gz CD bison-2.6.4./ Configuremake && make Install

# upgrade RE2C, fix you'll need re2c 0.13.4 or later if you want to regenerate PHP

Parsers. Error

Cd/var/soft/wget Http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/downloadtar ZXF re2c-0.13.5.tar.gz && CD re2c-0.13.5./configuremake && make install

Compiling PHP7

# Create directory mkdir-p/var/soft/php7cd/var/soft/php7# download source code git clone Http://git.php.net/repository/php-src.gitcd php-src./ buildconf# configuration parameters./configure--PREFIX=/USR/LOCAL/PHP7 \--with-config-file-path=/usr/local/php7/etc \--with-mcrypt=/ Usr/include \--with-mysql=mysqlnd \--with-mysqli=mysqlnd \--with-pdo-mysql=mysqlnd \--with-gd \--with-iconv \-- With-zlib \--enable-xml \--enable-bcmath \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \-- Enable-mbregex \--enable-fpm \--enable-mbstring \--enable-ftp \--enable-gd-native-ttf \--with-openssl \-- Enable-pcntl \--enable-sockets \--with-xmlrpc \--enable-zip \--enable-soap \--without-pear \--with-gettext \-- Enable-session \--with-curl \--with-jpeg-dir \--with-freetype-dir \--enable-opcache############################### ###################################################/encodings.c:101:undefined reference to ' libiconv_ when compiling and installing PHP Close ' Wrong workaround # The following error occurred while loading PHP: #/root/downloads/php-5.6.5/ext/xmlrpc/libxmlrpc/encodings.c:73:undefined RefeRence to ' libiconv_open ' #/root/downloads/php-5.6.5/ext/xmlrpc/libxmlrpc/encodings.c:81:undefined reference to ' Libiconv ' #/root/downloads/php-5.6.5/ext/xmlrpc/libxmlrpc/encodings.c:101:undefined reference to ' Libiconv_close ' # /root/downloads/php-5.6.5/ext/xmlrpc/libxmlrpc/encodings.c:101:undefined reference to ' Libiconv_close ' # collect2: Error:ld returned 1 exit status# make: * * * [sapi/cli/php] Error # According to the PHP website described this is a bug (https://bugs.php.net/bug.php?id=5261 1). After configure to manually modify the next makefile file, find Extra_libs in the last add-liconv can smooth through # (about makefile File 104) # extra_libs =-lcrypt-lz-lresolv- Lcrypt-lrt-lmysqlclient-lmcrypt-lltdl-lpng-lz-ljpeg-lcurl-lz-lrt-lm-ldl-lnsl-lxml2-lz-lm-ldl-lssl-lcryp  To-lcurl-lxml2-lz-lm-ldl-lfreetype-lmysqlclient-lz-lm-lssl-lcrypto-ldl-lxml2-lz-lm-ldl-lxml2-lz-lm-ldl -lcrypt-lxml2-lz-lm-ldl-lxml2-lz-lm-ldl-lxml2-lz-lm-ldl-lxml2-lz-lm-ldl-lssl-lcrypto-lcrypt-liconv### ############################################################################### compiling and installing make && sudo make install 

# Configuration

CP PHP.INI-PRODUCTION/USR/LOCAL/PHP7/ETC/PHP.INICP Sapi/fpm/init.d.php-fpm/etc/init.d/php7-fpmchmod +X/ETC/INIT.D /php7-fpmcp/usr/local/php7/etc/php-fpm.conf.default/usr/local/php7/etc/php-fpm.confcp/usr/local/php7/etc/ Php-fpm.d/www.conf.default/usr/local/php7/etc/php-fpm.d/www.conf

# Configure Opcache

vim/usr/local/php7/etc/php.ini# Join ZEND_EXTENSION=/USR/LOCAL/PHP7/LIB/PHP/EXTENSIONS/NO-DEBUG-NON-ZTS-20141001/ opcache.so# starting/ETC/INIT.D/PHP7-FPM Start

# View PHP Version

/usr/local/php7/bin/php-v

Results:

PHP 7.0.0-dev (CLI) (Built:mar 3 10:02:26) Copyright (c) 1997-2015 the PHP groupzend Engine v3.0.0-dev, Copyright (c ) 1998-2015 Zend Technologies with  Zend opcache V7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies

The above is this article to everyone to share the PHP7.0 installation notes finishing, I hope to help you.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.