DEV Community

Aanyu Deborah Oduman
Aanyu Deborah Oduman

Posted on

How to get Xampp working on your M1 chip Macbook pro

So... a while ago, my Macbook M1 pro was just a brand new machine with very little software installed. As a dev, obviously, I needed to install Xampp and a bunch of other applications that I always had on my Windows computer. I remember my installation was successful, but when i went back to use it this one time, I got one of the most annoying errors that I have received since I started using the M1. I don't know what happened! Suddenly, Xampp was incompatible with the M1??
INFO:Starting "XAMPP" stack ERROR: Error starting "XAMPP" stack: cannot calculate MAC address: hv_vm_create unknown error -
Clicking on the "Show details" will show you an error that looks like...

INFO: Starting "XAMPP" stack ERROR: Error starting "XAMPP" stack: cannot calculate MAC address: hv_vm_create unknown error -85377023

Another thing i noticed is that my opening screen looked like this...
Wrong Xampp starting screen
...instead of this....
Correct Xampp starting screen
So my next course of action, of course, was to search for solutions from StackOverflow, and I tried out a couple, but they weren't exactly working for me. I kept getting the same error when I launched the application.
It is possible that i might have been too frustrated to read through all the solutions properly and find the right one 🤷🏽‍♀️

Anyway, I concluded that Xampp was probably not compatible with the M1 (like many software) and moved on to other options. Alas! Today, I found myself in a similar position. I needed to self host a Learning Management System using Drupal, and I needed Xampp (to be my server) for that. Damn, I was back here again. So I tried starting Xampp again(the one that i had unsuccessfully tried to set up the last time) hoping that by some magic, it would work this time. LOL!
You guessed right, it didn't work.

Anyway, I did some Googling (with a lot more patience this time) and I came across this post by somebody who seemed to have a found a solution that worked.
Basically, what the author of the post did was this:

  • Go to your Applications folder and make a copy of the Xampp application that you already have installed. Do not uninstall it! Make a copy! Make copy of Xampp in Applications folder
  • After you've done that, delete the original "Xampp" application. (Right click on it, and select "Move to bin")

  • Open your browser, and enter this url. (You could also simply open this url in a new tab) https://www.apachefriends.org/tr/download.html

  • Download the version 7.2.34/PHP 7.2.34 of the Xampp application. This is the exact link to the download page, if you don't want to have to look for it. Click the link where the arrow is pointed. https://sourceforge.net/projects/xampp/files/XAMPP%20Mac%20OS%20X/7.2.34/
    Alt Text

  • Once the download is finished, click on the .dmg file to install Xampp (for real this time 😂). Launch your application.

    I hope you got this beautiful window!
    Welcome to Xampp!
    Good luck! I hope it worked for you!

Kindly share this blogpost with somebody who might be having some trouble with Xampp on the M1 Macbook Pro! Leave a comment if this blogpost helped you :).

Top comments (21)

Collapse
 
ekuwurd profile image
Ephwurd Kuwurd

I use these two commands to launch apache, php, mysql (without launching old XAMPP client which doesn't work anymore in Macbook M1).

sudo /Applications/XAMPP/xamppfiles/xampp startapache

sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

Collapse
 
jovyllebermudez profile image
Jovylle B

The UI did worked on my end. But I did currently installed xampp with php 5.6.40 version.

Collapse
 
ssmusoke profile image
Stephen Senkomago Musoke

I tend to use Laravel Valet for serving PHP projects with a configurable tld I use the test

It provides native capabilities to create SSL certificates for the domains, share via ngrok

The MySQL setup I use Homebrew

Collapse
 
paolamd profile image
paola-md

It worked like magic! I still don't understand why, but thank you so much!

Collapse
 
deborahtrez profile image
Aanyu Deborah Oduman

Youre welcome!

Collapse
 
adrienneklee profile image
Adrienne Lee

This is exactly the post I was looking for - thank you for this walk through, totally worked on my new M1 after a number of other failed attempts!

Collapse
 
strangeall profile image
David Benna

Thank You 💪🏼😊

Collapse
 
kakoozajerry profile image
Abraham Jerry Kakooza

Great piece. Was totally helpful. Hopefully am gonna find out the magic behind this😁

Collapse
 
deborahtrez profile image
Aanyu Deborah Oduman

I'm happy that you found it helpful! :)

Collapse
 
cgz profile image
Christoph • Edited

well the 7x version is running yes. but not the actual 8x version.

i still get the "cannot calculate MAC address: hv_vm_create unknown error 0x00000004
Using fd 13 for I/O notifications" error message

Collapse
 
cryptorhinogh profile image
CryptoRhinoGH • Edited

_[RESOLVED FOR PHP>8.x for M1 Mac] _
I just made an account to say this:
Go to sourceforge, specifically, here:
sourceforge.net/projects/xampp/fil...
download the INSTALLER. Do not use the VM. You should be able to use it after it installs, and brings back the familiar opening there was earlier

Collapse
 
logan_greer_ca844dca51b41 profile image
Logan Greer

Does this work for the php 8 version?

Collapse
 
deborahtrez profile image
Aanyu Deborah Oduman

I don't think so. I've had that issue too.

Collapse
 
cgz profile image
Christoph

It does not :(

Collapse
 
jessicagithub profile image
Jessica Jeong

Thank you for this! :) Just wondering if we can delete the copy of the first XAMPP installation once the "real" one is successfully set up?

Collapse
 
deborahtrez profile image
Aanyu Deborah Oduman

That's a risk. 😂 I think I tried it once and got problems.

Collapse
 
thinmyatnaing profile image
Thinmyat

It was amazing ! It is working on M1 Macbook Air. Thanks a lot. Totally Helpful.

Collapse
 
asdadqd profile image
asdadqd

Thank you very much for you help

Collapse
 
samuel_wilson_87ec1810dd6 profile image
Samuel Wilson

Thank you so much. Created an account just to say thanks.!

Collapse
 
ouimazsa profile image
ouiminga • Edited

install the dmg instead of vm
that resolved my problem
sourceforge.net/projects/xampp/fil...

Collapse
 
anuragd3118 profile image
Anurag Deshmane

how to install php in xampp in mac m1?