I am always a fans of WAMP which
stand for Windows Apache Mysql and PHP framework. It is easy to install and
ready to use right away. However, as there are always new version of PHP or
Apache coming out to fix the vulnerabilities or security loop hole they have.
In this article, it will shows the steps to upgrade Apache and php version.
For Apache
- Download the latest Apache windows version from
- https://www.apachelounge.com/download/
- Unzip the zip file and put it under the WAMP
installation folder > bin > Apache
- E.g if your WAMP installation path is c:\wamp,
- then the apache folder should be under
c:\wamp\bin\apache\
- E.g If your WAMP installation path is D:\wamp
- then the apache folder should be under
D:\wamp\bin\apache\
- You should be able to see all previous available
version of Apache in that folder
- make sure you put in the version number so that you
can identify which folder is for which apache version
- In this case, the apache is upgrading from version
2.4.46 to 2.4.49
- Compare
the differences between new apache version and the last working apache
version. I am using winmerge
- Pay extra focus on the conf\httpd.conf file
- Make sure the apache version is correct
- Make sure it is listening on the correct port
- By default it is opening at port 80
- Make sure all module that have enabled for previous
version Apache is also enabled for the new version of Apache
- If you have defined ssl connection with the ssl keys,
make sure the httpd-ssl.conf changes from the old version is sync to the
new version as well
- Next open wamp
- Refresh wamp
- The
newly added Apache version should be available now
For PHP
- Download the latest php windows version from
- https://windows.php.net/download/
- Unzip the zip file and put it under the WAMP
installation folder > bin > php
- E.g if your WAMP installation path is c:\wamp,
- then the php folder should be under c:\wamp\bin\php\
- E.g If your WAMP installation path is D:\wamp
- then the php folder should be under D:\wamp\bin\php\
- You should be able to see all previous available
version of Apache in that folder
- make sure you put in the version number so that you
can identify which folder is for which php version
- In this case, the php is upgrading from version
7.4.13 to 7.4.24
- Win
merge to compare with previous version
- Especially
on the php.ini
- And
copy the php.ini to become phpForApache.ini
- phpForApache.ini
is using by WAMP hence it is necessary to exists, it can be the exact
same content as php.ini
- Make sure all modules that are enabled in previous
version are enable in the new version
- Refresh WAMP
- The newly added php version should be available now
- After selecting that new version of apache, it will
take a while for the service to restart and the wamp icon should become
green after that.
- It should also shows that the latest php version are
now being use.
- If the wamp icon is red, you can check the PHP error
log for issue
- Verify
Apache and php version from phpinfo