The PHP community has released major update over a decade as PHP 7. PHP 5 brings many exited features like support of Object oriented programming and many related with that.
You guys may wonder why PHP community released PHP 7 just after PHP 5 why there is no PHP 6? Well requirement for PHP 6 were not defined clearly and most of the people not agreed with, so the project ground to the halt. Almost all the features defined for PHP 6 were already implemented in PHP 5.3 and it’s later versions of PHP 5. So we almost got everything, which was documented for PHP 6, when features set for a major release community decided to avoid confusion with dead project and skip to PHP version 7 with the major updates.
Installing PHP 7 on WAMP server
We assume you already have wamp server installed on your window pc.
Download PHP7 Thread Safe Version
You need to download php 7 latest thread safe version from http://windows.php.net/qa , you need to find the version suitable on your OS, like for 64 bit OS download VC14 x64 Thread Safe. I would highly recommend to go for the Thread Safe version do not download Non Thread safe.
Download Visual C++ redistributable Package
If you already have installed you can skip this step but if you are not sure please download Visual C++ redistributable from https://www.microsoft.com/en-us/download/details.aspx?id=48145 , Please find the Version which is suitable for you OS. If you not sure you can download and install both x64 and x86.
Installing PHP7 on WAMP Server
- Now go to your wamp directory assume you have installed wamp on D drive then it would be
D:/wamp/bin/php/. Create new folder named
php7.X.X, here X.X is the Thread safe version you have downloaded. Assume you have downloaded 7.0.7 then the folder name would be
php7.0.7, extract all content which is downloaded from php7.0.7 Thread safe zip
- After that go to your old php version if you have old php version 5.5.12 then go to
wampserver.confto your new
- Now edit newly copied php.ini in notepad, find
extension_dirand change the path to
D:/wamp/bin/php/php7.0.7/extnow find the extension lists search for the line
; Be sure to appropriately set the extension_dir directiveand replace all the extension list with the following code until
Replace following lines php.ini1234567891011121314151617181920212223242526272829303132333435363738394041424344; Be sure to appropriately set the extension_dir directive.;extension=php_bz2.dllextension=php_curl.dll;extension=php_com_dotnet.dll;extension=php_enchant.dllextension=php_fileinfo.dll;extension=php_ftp.dllextension=php_gd2.dllextension=php_gettext.dllextension=php_gmp.dllextension=php_intl.dllextension=php_imap.dll;extension=php_interbase.dllextension=php_ldap.dllextension=php_mbstring.dllextension=php_exif.dll ; Must be after mbstring as it depends on itextension=php_mysqli.dll;extension=php_odbc.dllextension=php_openssl.dll;extension=php_pdo_firebird.dllextension=php_pdo_mysql.dll;extension=php_pdo_oci.dll;extension=php_pdo_odbc.dll;extension=php_pdo_pgsql.dllextension=php_pdo_sqlite.dll;extension=php_pgsql.dll;extension=php_phpdbg_webhelper.dll;extension=php_shmop.dll; The MIBS data available in the PHP distribution must be installed.; See [www.php.net];extension=php_snmp.dllextension=php_soap.dllextension=php_sockets.dllextension=php_sqlite3.dll;extension=php_sysvshm.dll;extension=php_tidy.dllextension=php_xmlrpc.dllextension=php_xsl.dll;;;;;;;;;;;;;;;;;;;; Module Settings ;;;;;;;;;;;;;;;;;;;;
- Now save the php.ini and create duplicate file and name it
- Find wampserver.conf file and edit in notepad, replace the file code with following:
wampserver.conf file123456789$phpConf['phpIniDir'] = '.';$phpConf['phpExeDir'] = '.';$phpConf['phpConfFile'] = 'php.ini';//PHP 7 needs Apache 2.4.x and doesn't works with Apache 2.2.x$phpConf['apache']['2.4']['LoadModuleName'] = 'php7_module';$phpConf['apache']['2.4']['LoadModuleFile'] = 'php7apache2_4.dll';$phpConf['apache']['2.4']['AddModule'] = '';
- After all those changes stop wamp server and restart it.
- Navigate to wamp icon and go to PHP > PHP version there you will find the new php7.0.7 version.
We have tested this method on wamp server version 2.5 and installed php 7.0.7 RC1 thread safe on it. If you encounter problem please double check all steps and make sure you stop all services and restart wamp server. You can also leave your comment and let us know how your installation goes throw.
Happy Coding 🙂