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

[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...

Is this a CSS Bug: setting Background and z-index for Pseudo selectors(::before & :: after)

Recently I was making some UI for a friend's project. We had this CSS button effect that works elsewhere but failed to work at the desired location. Upon troubleshooting, we discovered that if the parent element has a background defined, you can't control the z-index of the pseudo selection of any of its children. Wait for it, I have got some demo. TL;DR set background colour or image for a " DIV.parent ", create a " Div.child " inside the " DIV.parent ". use CSS to modify the " ::before" " element of the " Div.child " as follows; set position as absolute, content as an empty string, height:100% and width is best at 50% for example purposes, lastly, give it a background colour. You will observe that the " ::before" " element is overlaying the actual element's content. Try to adjust the z-index of the " ::before" ". You will also realize that the z-index works fine if we remove the backgroun...

Ubuntu: Unable to get IP for network interface / Using multiple network adapters

This is a very focused article on a similar issue which i encountered very recently. Problem: I recently installed Ubuntu Server 20.0 on a virtualBox. My intention was to use 2 network adapters as shown in the picture below. Host-Only Network NAT After setting up, I realised that i could not get IP address for the NAT adapter and it was always DOWN. Solution: Ubuntu20.0 comes with a different Newtork Configuration System compared to older ones like Ubuntu 14. The new Ubuntu uses netplan to handle network configurations. To solve this issue, you need to add specific information about every adapter into the netplan configuration file. The first adapter will always be configured by default. Follow through this article to learn how in 5 easy steps. 1. The picture below shows that my VM is already configured to use 2 network adapters. 2. Now i powered up the VM and check my network parameters. I powered the VM and ran the commands to check if my 2 network adapters we...