Skip to main content

Laragon: installing more versions of Apache/HTTPD

Most of the time, we casually install various PHP versions and server tools without checking if they were built for Win32 or Win64. A discussion for another day.

I recently downgraded Laragon’s from PHP8.1-x64 to PHP7.x-x86. This had a little consequence - APACHE! Hence, I got the error below, indicating that my PHP and Apache can’t work together because they are of different architectures or builds.

 



The originally installed Apache was for 64-bit PHP versions, there are no Apache versions designed to run both 32-bit and 64-bit builds of PHP.

In this article, I share steps and links that guide you to install multiple versions and builds of Apache on Laragon.

1. For all intent and purposes, you are advised to always download the latest version of Apache. Visit this URL https://www.apachelounge.com/download/additional/ to see the different versions available. It is easy to access the 64-bit versions from the homepage. However, to access the 32-bit versions, you need to use this URL.

2. Now you should see a list of recent and actively maintained versions of Apache’s httpd. The most recent version is highlighted in yellow. You can click any version of your choice.


3. The new page displays 2 special links, one of these links is for 64-bit versions while the other is for the 32-bit version. Both are highlighted below.


4. The downloaded file is located in your downloads folder as such

 


5. Copy the downloaded zip file and paste it in the Laragon folder for Apache versions (C:\laragon\bin\apache), this may differ on your PC. After unzipping, you should have a new folder as shown below.

  


6. If you open this newly unzipped folder, you will notice the actual content is nested inside another sub-folder. Sub-folder is named “Apache24”. You should delete the other files in this directory since they are not needed. You can as well open the ReadMe.txt file to learn more about the installation.

 


7. When you open the sub-folder, you should see something similar

sub-folder location : C:\laragon\bin\apache\httpd-2.4.54-win32-VC15\Apache24

 


8. Use Ctrl+A to highlight all files here or use your mouse. Press Ctrl+X to cut or use your right-click context menu.

9. Go backwards one folder and paste these files into this new location.

New location: C:\laragon\bin\apache\httpd-2.4.54-win32-VC15

 


10. Now your new location should look like this, You can delete the Apache24 folder now. See the highlighted item below

 


11. Now open the httpd.conf configuration file shown below

 


12. Scroll down a bit to locate the line with ``` Define SRVROOT "c:/Apache24"```

 


13. Remove Define “c:/Apache24" and insert the correct path for this new Apache file.

new value: C:/laragon/bin/apache/httpd-2.4.54-win32-VC15

take careful note of the slash, it’s a forward slash not backwards.

 


14. Open Laragon, stop all services and select the new version of Apache like below

 


15. Also ensure that you have selected a 32-bit version of PHP as seen below. Ensure the PHP version is suffixed with ‘x86’. Like shown above.

16. Now you can start all services. All should work fine without errors.

 


17. So, when next you see such an error as below, simply read through this article, select the appropriate Apache version and voila, no more errors.

“Please make sure PHP and Apache are both:

   -x86(win32) or x64(win64)

   Same VC (VC11, VC14, VC15…)”

18. Although in this article, we downgraded Apache to match the PHP version, alternatively, we could also upgrade or downgrade PHP to match Apache’s version.


In conclusion, when you encounter an error indicating that your PHP and Apache builds are not compatible, simply follow these steps to select the appropriate Apache version.

Although in this article, we downgraded Apache to match the PHP version, alternatively, we could also upgrade or downgrade PHP to match Apache’s version.


--------------------------------------------------------------------------------------------------------

The article above is an initial draft, but rather than put in much work, I asked ChatGPT to re-write. click here to read ChatGPT's version.


I also asked ChatGPT to suggest a title for the Post. AI may do so much task, current state of the industry suggests that some level of supervision is still necessary. Is this the goal of AI? to achieve unsupervised existence and performance? 


Thanks for reading.


Comments

Popular Articles

Resolving Incompatible Builds of PHP and Apache in Laragon: Add multiple versions of Apache

 As developers, it's often the case that different versions of PHP and server tools are installed quickly without taking into account the architecture for which they were built. In this article, we will focus on solving a specific error that arises when running incompatible builds of PHP and Apache. Recently, I encountered an issue when downgrading my Laragon setup from PHP 8.1 (x64) to PHP 7.x (x86). This caused compatibility problems with Apache, and I received an error message indicating that my PHP and Apache builds were not compatible, as the Apache installed was built for x64 versions of PHP. In this article, I'll provide a step-by-step guide on how to install multiple versions of Apache on Laragon. By following these steps, you can resolve any similar issues that you may encounter. Step 1: Download the Latest Version of Apache Visit https://www.apachelounge.com/download/additional/ to download the latest version of Apache. The homepage provides quick access to 64-bit ve

[SOLVED] Linux - Issues installing Docker on Ubuntu - libseccomp2 version 2.3.1 installed but 2.4 required

This article has been improved for a better understanding - goto  https://splashcoder.blogspot.com/2023/07/installing-docker-on-ubuntu-1804-solved.html There is a possibility that you are trying to install docker. There is a very comprehensive guide at https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository. The linked guide serves as a reference for this article. We try to address the common errors in this article. Just so you won’t have to scour the entire answers on StackOverflow. Step 1: The first thing is to run our famous "apt update" command. So run the command below. sudo apt-get update You may observe that there are some errors. And YES! we are using a fairly old Ubuntu 18.04 Bionic Beaver Release. It seems perfect for this as most people have issues installing docker anyways. To resolve this, you may refer to  Configure DNS server IP to resolve errors with apt-get update Step 2: Following the Docker article, we should run the commands below. sudo