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

Installing Docker on Ubuntu 18.04 ([SOLVED]- libseccomp2 version 2.3.1 installed but 2.4 required)

 Introduction: If you're attempting to install Docker on Ubuntu 18.04 Bionic Beaver, which is known for having installation issues, this comprehensive guide aims to address common errors you may encounter during the process. Our goal is to save you time searching for answers on StackOverflow by providing clear instructions. The guide is based on the official Docker documentation available at https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository. Step 1: Updating Package Lists To begin, run the following command to update your package lists using the "apt-get update" command: sudo apt-get update Note: If you encounter any errors during the update process, it may be due to the older Ubuntu 18.04 release. In such cases, you can refer to the Configure DNS server IP to resolve errors with apt-get update  guide for assistance. This guide will help you address any DNS-related issues that might be preventing successful updates. Step 2: Installing Dependencie...

Linux - How many network cards/interfaces do I have and what's their IP

 Yup! You have your Linux server or desktop installed, you have been enjoying this setup and suddenly you need to know how many network adapters are installed. You probably also want to know which of these adapters is connected to the internet, please follow through. First, you should run the command below on the terminal ip addr TL; DR: T here are 2 network adapters here,  “enp0s3” is my internet network adapter because it has an IP address from my internet gateway/router/MiFi. The IP address pattern gives this information.it begins with 192.x.x.x. Also "epn0s8" is the local network adapter which allows connections within an ethernet,  This output is quite verbose. Let’s dissect it in a bit. Firstly, we can observe items 1, 2 and 3. It is worth mentioning that item 1 is not an adapter, it is synonymous with the local network. Item 1 is labelled as “lo:”, this means that details in this section have to do with your localhost. Internal network setting of your system. This ...

How to Selectively Disable Timestamp Columns in Laravel Models

Introduction: In Laravel, the updated_at and created_at columns are timestamp columns that automatically update whenever a model is saved or created. However, there might be scenarios where you want to selectively disable one or both of these columns for specific models. Fortunately, Laravel provides a straightforward way to achieve this by customizing your model's const UPDATED_AT and const CREATED_AT constants. In this blog post, we will explore how to selectively disable timestamp columns in Laravel models, discuss the benefits of this approach, and guide you through the necessary steps. Step 1: Create a Laravel Model and Migration To demonstrate this process, let's assume we have a model called Download that represents a downloadable file in our application. If you don't have a model already, you can create one using the php artisan make:model Download command in your terminal. To generate the migration for the downloads table, run the following command: php ar...