We recently upgraded our development and production servers to PHP 7. We develop locally using Wamp Server so we needed to install PHP 7 on our computers as well. After digging around and some trial and errors I found the youtube video below.
Install Microsoft Packages
- Install both of the following packages from Microsoft
https://www.microsoft.com/en-us/download/details.aspx?id=48145
Download PHP 7
- Download PHP zip file from http://windows.php.net/download/
- Choose the correct file 64 or 84 bit Depending on your operating system
- Choose the Thread Safe file
Create PHP7 Folder in wamp directory
- Extract contents from PHP7 Download
- Copy files over to a new folder in
wamp\bin\php\php7.0
- You will need to copy 2 files from an older php version
php.ini
andwampserver.conf
into your new folderwamp\bin\php\php7.0
Modify php.ini
- In your new folder open
php.ini
- In
php.ini
findextension_dir
and replace the older php version with the new version - In
php.ini
findzend_extension
and comment this line out it is no longer needed. - Create a copy of
php.ini
once the above changes are made and rename it tophpForApache.ini
Modify wampserver.conf
- In your new folder open
wampserver.conf
and replaceLoadModuleName
andLoadModuleFile
to load the PHP 7 like so
phpConf['apache']['2.4']['LoadModuleName'] = 'php7_module';
$phpConf['apache']['2.4']['LoadModuleFile'] = 'php7apache2_4.dll';
$phpConf['apache']['2.4']['AddModule'] = '';
Start Wamp Load PHP 7
- Start Wamp > PHP > Version > 7
Notes: PHP 7 needs Apache 2.4 otherwise it will not run. Make Sure Wamp Server is running Apache 2.4. In the video the extensions were changed I tried it and it PHP 7 wouldn’t load in Wamp Server so i kept the same extensions from my previous php.ini file and it worked