• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » PHPNG : The Faster Next Version of PHP

By Abhishek Ghosh March 29, 2015 8:13 am Updated on March 29, 2015

PHPNG : The Faster Next Version of PHP

Advertisement

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 :

Advertisement

---

Vim
1
2
https://wiki.php.net/phpng-upgrading
http://www.phpclasses.org/blog/post/234-PHPNG-Dramatic-Speedup-Features-Coming-in-PHP-6-Release.html

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 PHP5 to 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 :

Vim
1
2
service php5-fpm stop
service nginx stop

We would recommend to use this first :

Vim
1
http://repos.zend.com/zend-server/early-access/phpng/dists/trusty/

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.

Vim
1
2
3
4
5
cd /opt
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 update
apt-get install php5

Start the services :

Vim
1
2
service php5-fpm start
service nginx start

If you run php -v :

Vim
1
2
3
4
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 :

Vim
1
/opt/fpm.sh

with modified paths matching with your current Nginx config’s UNIX Socket :

Vim
1
2
3
#!/bin/bash
 
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 :

Vim
1
2
3
mkdir $HOME/php7
cd $HOME/php7
git clone https://git.php.net/repository/php-src.git

PHPNG - The Faster Next Version of PHP

These are fixes for errors :

Vim
1
2
3
4
5
6
7
8
9
10
sudo apt-get install libt1-dev
sudo apt-get install libgmp-dev
locate gm.h
# 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
wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb
wget http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb
dpkg -i bison_2.7.1.dfsg-1_amd64.deb

we have to build :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cd php-src
./buildconf
./configure \
    --prefix=$HOME/php7/usr \
    --with-config-file-path=$HOME/php7/usr/etc \
    --enable-mbstring \
    --enable-zip \
    --enable-bcmath \
    --enable-pcntl \
    --enable-ftp \
    --enable-exif \
    --enable-calendar \
    --enable-sysvmsg \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-wddx \
    --with-curl \
    --with-mcrypt \
    --with-iconv \
    --with-gmp \
    --with-pspell \
    --with-gd \
    --with-jpeg-dir=/usr \
    --with-png-dir=/usr \
    --with-zlib-dir=/usr \
    --with-xpm-dir=/usr \
    --with-freetype-dir=/usr \
    --with-t1lib=/usr \
    --enable-gd-native-ttf \
    --enable-gd-jis-conv \
    --with-openssl \
    --with-mysql=/usr \
    --with-pdo-mysql=/usr \
    --with-gettext=/usr \
    --with-zlib=/usr \
    --with-bz2=/usr \
    --with-recode=/usr \
    --with-mysqli=/usr/bin/mysql_config

Now install :

Vim
1
2
make
make install

You need to create PHP.ini manually :

Vim
1
2
mkdir $HOME/php7/usr/etc
nano $HOME/php7/usr/etc/php.ini

Actually, more is written here :

Vim
1
https://wiki.php.net/phpng

There is a PDF file too.

Tagged With compile php with phpng engine , https://thecustomizewindows com/2015/03/phpng-the-faster-next-version-of-php/ , php5 1 2 upgrade
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to PHPNG : The Faster Next Version of PHP

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Install WordPress on Nginx With HHVM on Ubuntu Cloud Server

    Here is Step by Step Guide to Install WordPress on Nginx With HHVM on Ubuntu Cloud Server. This simple and most easy standalone HHVM only guide. We talked about HipHop Virtual Machine or HHVM in order article. Normally, with Nginx, we use PHP5-FPM. This guide is how to install WordPress on Nginx with HHVM on […]

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • HipHop Virtual Machine (HHVM)

    HipHop Virtual Machine (HHVM) is a process virtual machine developed by Facebook, serves as an execution engine for PHP, based on JIT.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy