PHPNG is the Next Version of PHP, Which in Real Life Tests Shows To Be More Faster and Reliable Than HHVM. We Can Easily Upgrade PHP5 to PHPNG. We wrote about HHVM before. Although, HHVM has been better in terms of compatibility than HHVM 3.6.0 LTS, yet as decided; we have ended support of HHVM related articles for normal PHP-MySQL based web softwares. Those who are not aware, PHPNG is a new development branch of PHP that, in reality, it will never see the light of the final release except in the form of the new version of PHP 7 – the major release of PHP. In other words, you need to compile PHPNG at this moment for the upgrade.
PHPNG : How it Became Official Part of PHP
Developers of Zend had attempted to introduce JIT Compilation engine in the existing PHP which gave pathetic results in the real world because of the mismanagement of memory allocation. Experiments conducted by Zend proved that, in the way the engine is currently designed, needed a change. NG patch changes the norm of using zvals, increasing performance and tidier API.
PHPNG : Official Guides
You can check the official websites for more information on PHPNG :
We recommend to spin a new server instance from OpenStack snapshot and do the steps for up-gradation before applying the changes on deployment server.
How To Upgrade PHPNG From PHP5 on Nginx PHP5-FPM Setup?
Obviously, on PHP-FPM there is the PHP part, for which we write as
PHP5-FPM. We can upgrade that
PHP7. We can not give warranty about W3 Total Cache Plugin.
We are are providing the needed commands to install on a running Ubuntu 14.04 LTS Server’s PHP5-FPM :
First stop PHP-FPM and Nginx :
service php5-fpm stop
service nginx stop
We would recommend to use this first :
This is PHP 5.7 and is PHPNG. Installing PHP 7 dev will need 100% manual work. Above package has paths which are the same ones as Ubuntu’s standard. Pain is lesser.
wget http://repos.zend.com/zend.key -O- 2> /dev/null | apt-key add -
echo "deb [arch=amd64] http://repos.zend.com/zend-server/early-access/phpng/ trusty zend" > /etc/apt/sources.list.d/phpng.list
apt-get install php5
Start the services :
service php5-fpm start
service nginx start
If you run
php -v :
PHP 5.7.0-dev (cli) (built: Jul 17 2014 16:56:38)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.7.0-dev, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
If FPM create’s issue then create a shebang file :
with modified paths matching with your current Nginx config’s UNIX Socket :
PHP_FCGI_CHILDREN=4 PHP_FCGI_MAX_REQUESTS=0 php-cgi -b /path/to/unix/socket
chmod it rightly and execute it.
If you are desparate to test PHP 7, then do these steps :
git clone https://git.php.net/repository/php-src.git
These are fixes for errors :
sudo apt-get install libt1-dev
sudo apt-get install libgmp-dev
# this is an example of symlinking
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
# use older version of bison and bison-dev
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb
dpkg -i bison_2.7.1.dfsg-1_amd64.deb
we have to build :
Now install :
You need to create
PHP.ini manually :
Actually, more is written here :
There is a PDF file too.