I'm trying to work with MongoDB in XAMPP. So, I follow these steps:

  1. Download and install XAMPP
  2. Start the software
  3. Run sudo /opt/lampp/bin/pecl install mongodb
  4. Add extension="mongodb.so" to /opt/lampp/etc/php.ini
  5. Run sudo /opt/lampp/lampp restart

At which point, I receive the following message:

XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.

Am I doing something wrong?

I do not wish to install Apache, php7, and Mongo onto my system. XAMPP is in one nice little place where everything can be deleted.


1 Answer 1


Although I have no use for Mongo, I tried to follow your steps and everything worked with no errors, I'm on Fedora 26. So there's only 3 conclusions.

  • Either you're on windows because Xampp ships only 32 bits packages to windows.
  • You installed Xampp 32 bit by mistake or perhaps your xampp is too old because xampp used to ship 32 bit only to linux as well in the past
  • You downloaded xampp from some repo and they gave you the 32 bit. Used to happen when I was on ubuntu.

I have xampp 7.1.9 for linux 64 bit from here. And by the way, after following your steps, I have no idea how to start mongo, I have never used pecl before. If I where you I'd install mongo using apt-get, Anyway good luck.

  • Just checked my downloads section in Chrome, I have the 64-bit installer from the wbsite. You can install mongo from apt-get but that kind of defeats the purpose of XAMPP. The MongoDB.so pecl is for php's native ability to utilize Mongo. Installing Mongo from the repos only gives you the db software. You still have to get the PHP library to use it with the PHP language.
    – KI4JGT
    Oct 11, 2017 at 20:49
  • What version do you have?
    – Lynob
    Oct 11, 2017 at 20:52
  • @Lynob Are we talking Fedora here? I believe the solution should be for Ubuntu! Oct 11, 2017 at 23:04
  • @lynob xampp has a linux version, not a fedora or an ubuntu version, his problem is with xampp, the solution that works on my pc should work on his. The commands that worked on his pc worked on mine, there's no dependencies. My answer should work on all linux
    – Lynob
    Oct 11, 2017 at 23:08
  • @Lynob, I have the newest version. I just downloaded it from the site.
    – KI4JGT
    Oct 12, 2017 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.