Thursday, 7 October 2021

How to upgrade WAMP PHP and Apache version

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

  1. Download the latest Apache windows version from
    1. https://www.apachelounge.com/download/
  2. Unzip the zip file and put it under the WAMP installation folder > bin > Apache
    1. E.g if your WAMP installation path is c:\wamp, 
      1. then the apache folder should be under c:\wamp\bin\apache\
    2. E.g If your WAMP installation path is D:\wamp
      1. then the apache folder should be under D:\wamp\bin\apache\
    3. You should be able to see all previous available version of Apache in that folder
      1. make sure you put in the version number so that you can identify which folder is for which apache version
        1. In this case, the apache is upgrading from version 2.4.46 to 2.4.49 

 

  1. Compare the differences between new apache version and the last working apache version. I am using winmerge




  1. Pay extra focus on the conf\httpd.conf file
    1. Make sure the apache version is correct





    1. Make sure it is listening on the correct port
      1. By default it is opening at port 80



    1. Make sure all module that have enabled for previous version Apache is also enabled for the new version of Apache



 

    1. 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



 

  1. Next open wamp



 

  1. Refresh wamp



 

  1. The newly added Apache version should be available now


 

For PHP

  1. Download the latest php windows version from 
    1. https://windows.php.net/download/
  2. Unzip the zip file and put it under the WAMP installation folder > bin > php
    1. E.g if your WAMP installation path is c:\wamp, 
      1. then the php folder should be under c:\wamp\bin\php\
    2. E.g If your WAMP installation path is D:\wamp
      1. then the php folder should be under D:\wamp\bin\php\
    3. You should be able to see all previous available version of Apache in that folder
      1. make sure you put in the version number so that you can identify which folder is for which php version
        1. In this case, the php is upgrading from version 7.4.13 to 7.4.24 



 

 

  1. Win merge to compare with previous version
    1. Especially on the php.ini
      1. And copy the php.ini to become phpForApache.ini
      2. phpForApache.ini is using by WAMP hence it is necessary to exists, it can be the exact same content as php.ini





    1. Make sure all modules that are enabled in previous version are enable in the new version
  1. Refresh WAMP




 

  1. The newly added php version should be available now


 

  1. 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.
    1. It should also shows that the latest php version are now being use.



  1. If the wamp icon is red, you can check the PHP error log for issue

 



 

  1. Verify Apache and php version from phpinfo




 

No comments:

Post a Comment

SMTP Mail Sending Failure - Connection troubleshooting

Background: I have encounter issue when sending email from my application server via SMTP server. The syndrome is only smaller size email is...