Reproduced PHP 5.6 on Centos/rhel 7.0 and 6.6 via Yum

Source: Internet
Author: User
Tags sapi zts zend

https://webtatic.com/packages/php56/

PHP 5.6.5 have been released on Php.net on 22nd January, and are also available for Centos/rhel 6.5 at webtatic via Yum .

PHP 5.6 Adds new features such as:

    • Constant scalar expressions
    • Variadic functions
    • Argument unpacking
    • Exponentiation operator
    • Support for large (>2GIB) file uploads
    • SSL/TLS improvements including peer verification by default
    • A new command line debugger called phpdbg

To see what else have been added, check out the "What's with changed in PHP 5.6.x.

To install, first you must add the Webtatic EL yum repository information corresponding to your Centos/rhel version to Yum :

Centos/rhel 7.x:

RPM-UVH HTTPS://MIRROR.WEBTATIC.COM/YUM/EL7/EPEL-RELEASE.RPMRPM-UVH https://mirror.webtatic.com/yum/el7/ webtatic-release.rpm

Centos/rhel 6.x:

RPM-UVH https://mirror.webtatic.com/yum/el6/latest.rpm

Now the can install PHP 5.6 (along with a opcode cache) by doing:

Yum Install php56w Php56w-opcache

If you would like to upgrade PHP to this version it's recommended so you first check that your system would support the upgrade, e.g. making sure any Cpanel-like software can run after the upgrade.

Unless you know doing, it's risky upgrading an existing system. It's much safer to does this by provisioning a separate server to perform the upgrade as a fresh install instead.

If you know what is doing, you can upgrade PHP by:

Yum install yum-plugin-replace yum replace--enablerepo=webtatic-testing Php-common--replace-with=php56w-common

It'll likely give you a message "warning:unable-Resolve all providers ...". This is normal, and you can continue by tying "Y". You'll be given a chance to see what packages'll be installed and removed before again being given a chance to confirm .

Sapis–different Runtime environments of PHP
mod_php NTS
(non-thread safety) Contained in the php56w package, this SAPI integrates into Apache Httpd 2.2.*. It is the standard SAPI for use with httpd prefork MPM (the default mode httpd is ran under. It is not a thread-safe, but doesn ' t need to being due to prefork using threads. It ' s located at/usr/lib[64]/httpd/modules/libphp5.so
Cli
Contained in the PHP56W-CLI package, this SAPI allows running scripts from the command-line, and also have a built-in Web server for Development-use. Located at/usr/bin/php
Fpm
Contained in the PHP56W-FPM package, FPM (FastCGI process Manager) is a scalable FastCGI Process, which acts similar To how HTTPD Prefork MPM Works managing it ' s forks. Located AT/USR/SBIN/PHP-FPM, it is controlled using THE/ETC/INIT.D/PHP-FPM service script
phpdbg
Contained in the php56w-phpdbg package, phpdbg have the ability to debug scripts using breakpoints from the Command-l INE, and also supports remote-debugging using a external Java client for remote communication.
Embedded
Contained in the php56w-embedded package, this SAPI allows embedding PHP on other applications. It ' s library is located at/usr/lib[64]/libphp5.so
CGI, fastcgi
Contained in the PHP56W-CLI package, these sapis is not recommended for use, but is available where needed. They both exist in the binary at/usr/bin/php-cgi.
mod_php TS
(thread safety) Contained in the php56w package, this SAPI integrates into Apache Httpd 2.2.*. It is the standard SAPI for use with httpd worker mpm. It's supposed to being thread-safe, but can ' t guarantee-to IS, and certainly not under additional PHP extensions. It ' s better to use FastCGI sapis than this one. It ' s located at/usr/lib[64]/httpd/modules/libphp5-zts.so
Packages Package
provides
php55w mod_php, Php55w-zts
Php55w-bcmath
Php55w-cli php-cgi, Php-pcntl, Php-readline
Php56w-common Php-api, php-bz2, Php-calendar, Php-ctype, Php-curl, Php-date, Php-ereg, Php-exif, Php-fileinfo, Php-filter, Php-ftp, PHP -gettext, Php-gmp, Php-hash, Php-iconv, Php-json, Php-libxml, Php-openssl, Php-pcre, Php-pecl-fileinfo, Php-pecl-phar, Php-pecl-zip, Php-reflection, Php-session, Php-shmop, Php-simplexml, Php-sockets, PHP-SPL, Php-tokenizer, Php-zend-abi , Php-zip, Php-zlib
Php56w-dba
Php56w-devel
php56w-embedded Php-embedded-devel
Php56w-enchant
php56w-fpm
Php56w-gd
Php56w-imap
Php56w-interbase Php_database, Php-firebird
Php56w-intl
Php56w-ldap
Php56w-mbstring
Php56w-mcrypt
Php56w-mssql
Php56w-mysql Php-mysqli, Php_database
Php56w-mysqlnd Php-mysqli, Php_database
Php56w-odbc PHP-PDO_ODBC, Php_database
Php56w-opcache Php55w-pecl-zendopcache
Php56w-pdo
Php56w-pear
Php56w-pecl-apcu
Php56w-pecl-gearman
Php56w-pecl-geoip
Php56w-pecl-imagick
Php56w-pecl-memcache
Php56w-pecl-xdebug
Php56w-pgsql Php-pdo_pgsql, Php_database
php56w-phpdbg
Php56w-process Php-posix, Php-sysvmsg, Php-sysvsem, PHP-SYSVSHM
Php56w-pspell
Php56w-recode
Php56w-snmp
Php56w-soap
Php56w-tidy
Php56w-xml Php-dom, Php-domxml, PHP-WDDX, php-xsl
Php56w-xmlrpc
Opcode Caches

The PHP distribution now comes with an opcode cache. The Zend optimizer+ opcode cache, now known as the Zend opcache extension. This extension are optional, so does not preclude you from using a alternate one.

Due to it being included in the PHP source distribution, it'll be a well maintained and more suitable Opcode Cache ' s is being updated over the coming months.

Yum Install Php56w-opcache
Error_reporting E_all now includes e_strict

As mentioned in the PHP 5.4 guide:

You could get a lot more errors coming out of your error logs if by default your error_reporting are set to E_all now without Explicitly turning off e_strict. The default php.ini that comes with the PHP package turns this off by default, but if your is upgrading from an existing I Nstallation, your php.ini May is updated, meaning this would likely be turned on.

Reproduced PHP 5.6 on Centos/rhel 7.0 and 6.6 via Yum

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.