DEV Community

Gustavo Jordan
Gustavo Jordan

Posted on

Laragon - How to upgrade Apache Server 2.4.41 and PHP 7.4.2

One of the currently easiest to configure web servers for web apps development is Laragon. It let us create different kinds of development applications, from a Laravel project to a WordPress site with just one click. This is my preferred server over my previous WAMP configuration.
After installation of Laragon, it brings previous versions for both, Apache and PHP, so we will upgrade their versions to the latest.

First download and install the latest Visual Studio C++ redistributables from the Microsoft site

https://support.microsoft.com/es-pa/help/2977003/the-latest-supported-visual-c-downloads

Now we should download both packages from their webpages and unpack then, download the 32 or 64 versions that suits your OS, this are the links:

https://www.apachelounge.com/download/
https://windows.php.net/download#php-7.4

If you have Laragon server running stop it.

After unpack then, copy both folders to the Laragon/bin folder, inside their respective package name, (the new Apache folder that you download inside Apache folder in Laragon/bin and the new PHP inside the PHP folder).

then edit the file php.ini with your preferred text editor and search for the line that reads "; Be sure to appropriately set the extension_dir directive". Replace with this text until the place that reads "Module Settings".

; Be sure to appropriately set the extension_dir directive.
;
extension=php_bz2.dll
extension=php_curl.dll
;extension=php_com_dotnet.dll
;extension=php_enchant.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_odbc.dll
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=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.dll

extension=php_soap.dll
extension=php_sockets.dll
extension=php_sqlite3.dll
;extension=php_sysvshm.dll
;extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

Now let’s start Laragon server again and after it finish to load, select web link from the Laragon Menu, it will load your Laragon localhost page, there you should see your current Apache and PHP version, and your new upgraded versions.

Now, we are ready to work again…

Discussion (0)