Running Multiple Versions of XAMPP on Ubuntu Linux

Categories: Shop Talk

Posted by: admin

04/05/2013

This week at I-SITE, one my tasks was to fix an issue dealing with a Drupal site’s Date API. I had downloaded the entire site to my Apache-Friends XAMPP Sandbox and began configuring it to work with my XAMPP 1.8.1 installation. Sure enough, I saw that the issue persisted, but I also noticed that when I would go back into edit a node that was previously created, the date would disappear entirely. After a bit of searching and bewilderment, I realized that this must be a PHP versioning issue, so I started to think of ways I might be able to install multiple separate installations of XAMPP and switch between them relatively easily.

Why Multiple Versions?
Why wouldn’t I just try to take my current installation and flub it to get the correct modules to load? Well, that takes time, and since the idea of XAMPP is to be an easy-to-install local development environment, that would be kind of going against the tao of the package itself.

How I Did It…
And remember, all of these things are based on the directory structure that made the most sense to me, so please feel free to adjust it to fit your system accordingly. This is also only for XAMPP, the Linux port of the Apache-friends project.

We know, from the XAMPP install guide, that XAMPP likes to be installed at /opt/lampp meaning that if you change the install directory, you’ll render the package inoperable. That’s because most of the modules in the package are looking to the/opt/lampp directory to be the root of the install. To get around this I downloaded the two versions of XAMPP that I needed from their SourceForge page, versions 1.8.1 and 1.7.4, and actually decompressed the contents into /opt/xampp/1.8.1 and/opt/xampp/1.7.4 respectively, making sure that each installation’s lampp binary was located at /opt/xampp/x.x.x/lampp

Then I set up a simple symlink from /opt/lampp to /opt/xampp/1.7.4/ so I could run the older environment.

For additional tweaks and customizations on the subject check out Curt’s blog.

 

 

Share: