php

LARAGON – Update PHP

1. Introduction

In Laragon, updating the PHP service to the latest PHP version is easy.

Just download the new version, unpack it into the right folder and select the new version in the Laragon menu.

You can even have multiple PHP versions installed. Switching between them is a piece of cake.

2. Notice

Be sure your Windows 10 (64 bit) OS has the latest Visual C++ Redistributable for Visual Studio 2015-2019 installed.

3. Laragon - Updating PHP

  • Download the latest Win32-vc15-x64 or Win32-vs16-x64 PHP version from windows.php.net into your \Downloads\ folder.
  • The packed file is named for instance php-7.4.16-Win32-vc15-x64.zip.
  • Unpack the downloaded ZIP archive in a folder with the same name, for instance php-7.4.16-Win32-vc15-x64.
  • Move the complete \php-7.4.16-Win32-vc15-x64\ folder to the \bin\php\ folder of your Laragon installation.
  • In the PHP section, select the newly installed PHP version.
  • Laragon will restart the PHP Service using the new version.
  • Now you can remove any previous versions by removing their folder from \bin\php\.

4. Configure the current PHP

Sometimes you want to customize your PHP installation.  In the PHP section of the Laragon Menu, there are options to :

  • quickly set some common PHP settings
  • edit the php values in the php. ini file
  • enable or disable PHP extensions

In my specific case I allways change these values :

  • realpath_cache_size=10M
  • date.timezone=’Europe/Brussels’
  • memory_limit=4G

5. PHP 8.x.x

The (free) Laragon application is not compatible with PHP 8.x.x yet. The author has to release an update to Laragon coping with some major changes in PHP module and extension naming conventions. Let’s be patient and give him the time to do so.

If you really need PHP 8.x.x support right now, there are some forum posts mentioning the corrections you’ll have to make manually. But keep in mind that switching back and forth between 7.xx and 8.xx requires manual interventions.

2 Comments

  1. PHP 8.0.x working correctly. We need to change the var from mod_php.conf in this directory (C:\laragon\etc\apache2) and it will run without any issue.
    First we need to run apache with the error than change this var from mod_php.conf (line 2)
    DEFAULT VALUE: LoadModule php8_module

    ———> CHANGED VALUE: LoadModule php_module

    • Thanks for the information. That’s correct. But there’s more to it. When you use PHP 8 in Laragon, php.ini is not automatically registering the extensions. You’ll have to do it manually. That’s an issue to be resolved by the Laragon author.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.