Oct
16

Resolving Apache Startup Errors with PHP 8 in Laragon Mint v6.0

10/16/2024 11:35 PM by Admin in Errors


Introduction

Laragon is a popular local development environment that simplifies the setup of web servers, databases, and other tools. However, when attempting to integrate PHP 8 into Laragon on Mint v6.0, users may encounter errors related to outdated Apache versions. This blog post will guide you through the process of resolving the error and upgrading Apache to the latest version.

The Error: nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation

When trying to add PHP 8 to Laragon and start Apache, you might encounter the following error:

nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation could not be located in the dynamic link library php-8.3.4\ext\php_curl.dll

This error indicates that the version of Apache you are using is incompatible with the latest PHP extensions, particularly the php_curl.dll extension. The solution is to upgrade Apache to a more recent version that supports these modern PHP features.

Step-by-Step Solution

1. Download the Latest Apache Version

To resolve the error, you need to upgrade Apache to a version that supports the latest PHP extensions. The recommended source for Apache binaries is ApacheLounge.

  1. Visit the ApacheLounge download page.
  2. Download the latest version of Apache for Windows. As of writing, the latest version is Apache 2.4.62.

2. Backup Current Apache Configuration

Before making any changes, it's crucial to back up your current Apache configuration files. Navigate to your Apache installation directory (usually located in C:\laragon\bin\apache\) and copy the conf directory to a safe location.

3. Replace the Old Apache Installation

  1. Extract the downloaded Apache ZIP file to a temporary location.
  2. Copy the extracted files to your Laragon Apache directory (C:\laragon\bin\apache\).
  3. Replace the existing files when prompted.

4. Verify the Upgrade

After replacing the Apache files, verify that the upgrade was successful by checking the Apache version again:

cd C:\laragon\bin\apache\httpd-2.4.62-240904-win64-VS17\bin
httpd.exe -V

# output
Server version: Apache/2.4.62 (Win64)

You should see the updated version number, confirming that the upgrade was successful.

5. Start Apache

Finally, start Apache from the Laragon interface.

If everything is configured correctly, Apache should start without any errors, and you should be able to use PHP 8.3 without encountering the nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation error.


Your Thoughts

Search
SPONSOR
CRYPTOWATCH
FOLLOW US
ANNOUNCEMENTS

New tool added : SVG Zoom Dimension Calculator.

SPONSOR