PHP7.0 installation notes, php7.0 notes _ PHP Tutorial

Source: Internet
Author: User
Tags php 7 features sapi
PHP7.0 installation notes and php7.0 notes. PHP7.0 installation notes sorting, php7.0 notes sorting: on April 9, the official PHP website published a message, officially released the first version of PHP7 alpha version. PHP7 features: PHP7.0.0Alpha1 use the new version of PHP7.0 installation notes sorting, php7.0 notes sorting

On July 6, June 11, 2015, the PHP official website published a message, officially releasing the first alpha version of PHP7.

PHP 7 features:

PHP 7.0.0 Alpha 1 uses the new version of ZendEngine, which brings many new features. The following is an incomplete list:

(1) Performance Improvement: PHP7 is twice better than PHP5.6. Improved performance: PHP 7 is up to twice as fast as PHP 5.6.

(2) fully consistent 64-bit support. Consistent 64-bit support

(3) many previous fatal errors are thrown. Specified fatal errors are now Exceptions

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

(5) added the null join operator. The null coalescing operator (??)

(6) A new comparison operator is added. Combined comparison Operator (<=>)

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

(8) a scalar type declaration is added. Scalar Type Declarations

(9) add an anonymous class. Anonymous Classes

PHP 7 Installation notes

# 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 to solve the problem You will 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

Compile PHP7

# Create the directory mkdir-p/var/soft/php7cd/var/soft/php7 # download the source code git clone http://git.php.net/repository/php-src.gitcd Php-src. /buildconf # configure 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 appears during php compilation and installation. c: 101: undefined reference to 'libiconv _ close' solution # the following error occurs when installing 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 1 # This is a bug ( https://bugs.php.net/bug.php?id=52611 ). After configure, you need to manually modify the Makefile file, find EXTRA_LIBS, and add-liconv at the end. # (about 104 of the Makefile file) # EXTRA_LIBS =-lcrypt-lz-lresolv-lcrypt-lrt-lmysqlclient-lmcrypt-lltdl-lpng-lz-ljpeg-lcurl-lz-lrt-lm-ldl-lnsl-lxml2- lz-lm-ldl-lssl-lcrypto-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 ############################# ######################################## ############ compile and install 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 # Add zend_extension =/usr/local/php7/lib/php/extensions/no-debug-non-zts-20141001/opcache. so # Start/etc/init. d/php7-fpm start

# View the PHP version

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

Result:

PHP 7.0.0-dev (cli) (built: Mar 3 2015 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 the PHP7.0 installation notes shared in this article. I hope this will help you.

On April 9, June 11, 2015, a message was published on the PHP official website. The alpha version of PHP 7 was officially released. PHP 7 features: PHP 7.0.0 Alpha 1 uses the new version...

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.