Having spent some time taking performance measurements with PHP 5 I’ve decided to try PHP 7 and run the suite of tests all over again.
This post documents my upgrade path. BTW: This post was first drafted in Jan 2016.
PHP 7 version installed
Having not previously used PHP 7, and since this is only a development environment I chose to install the PHP v7.0.2 Release Candidate 1 for Windows. Since I am running performance tests I also enabled the OPcache extension.
C:\php>php -v PHP 7.0.2RC1 (cli) (built: Dec 22 2015 19:22:13) ( ZTS ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Upgrading the WAMP environment
- Download the required .zip files
Software Was Now Downloaded from PHP 5.3.5 7.0.2RC1 http://windows.php.net/qa Apache 2.4.10 2.4.18 http://www.apachelounge.com/download/VC14/binaries/httpd-2.4.18-win64-VC14.zip VC++ 2012 2015 https://www.microsoft.com/en-us/download/details.aspx?id=49984
- Install the new Windows VC++ Redistributable libraries
- Rename original PHP 5 installation directory from
- Install PHP 7 to
c:\phpand run a basic test on the command line
- Stop Apache24 server (using
- Rename Apache 2.4 installation directory from
- Install Apache2.4.18 to
- Apply required configuration changes to
- Restart Apache server
- When happy it’s working, reboot Windows and recheck that things are still working
- Re-enable OPcache
|extension||curl gd2 mbstring mysqli openssl|
where extensions are
LoadModule php7_module "C:/php7/php7apache2_4.dll" PHPIniDir "C:/php7/"
- QA binaries are NOT intended for production use
- I didn’t reinstate every customization in my
- So far I haven’t had to change any of my PHP code specifically for PHP 7
- I retained the c:\php5 and c:\Apache24 folders for two reasons
- As backups in case I needed to restore to a previously working version or have a desire to enable version switching
- To compare .ini files to determine which configuration changes I need