multiple installs on 1 mac?

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

multiple installs on 1 mac?

Postby spcs5618 » 21. August 2013 09:45

I want to test a site on different php versions.
Is it possible (as mentioned in xampp for windows topic http://community.apachefriends.org/f/viewtopic.php?p=182516 - last post) to install multiple instances of xampp on 1 mac?
spcs5618
 
Posts: 1
Joined: 21. August 2013 09:33
Operating System: OSX

Re: multiple installs on 1 mac?

Postby mwxJudy » 28. January 2016 10:55

That was a long time ago... but you finally made it? I have the same problem. I couldn't find a way to change the default installation folder. Maybe you can help? thanx
mwxJudy
 
Posts: 2
Joined: 28. January 2016 10:31
Operating System: Mac OS

Re: multiple installs on 1 mac?

Postby Nobbie » 28. January 2016 13:19

There is no need to install more than one instance of Xampp. Instead create different VirtualHosts and install PHP as CGI Module. You may apply different PHP Versions in each VirtualHost, for example:

Code: Select all
<VirtualHost *:80/>
        ServerName php5.localhost
         ....
   
        AddHandler php-script .php
        Action php-script /php5/php-cgi
        ScriptAlias /php5 /Applications/path-to-php5
</VirtualHost>
<VirtualHost *:80/>
        ServerName php4.localhost
         ....
   
        AddHandler php-script .php
        Action php-script /php4/php-cgi
        ScriptAlias /php4 /Applications/path-to-php4
</VirtualHost>



You may even apply the same DocumentRoot to these VirtualHost if you want, at runtime only the name of the server (php5.localhost or php4.localhost) decides which PHP Version is used. For example http://php5.localhost/test.php will be executed by PHP5, whereas the same file is executed by PHP4 via http://php4.localhost/test.php

Of course, you may specify different DocumentRoots as well, this is usefull if you have for example two different versions of a tool (lets say WordPress or Joomla) and the one installation should run under PHP5 and the other under PHP4. With the help of VirtualHosts you can even specify more than only two different environments for your projects. And there is no need for a multiple Xampp installation.
Nobbie
 
Posts: 8063
Joined: 09. March 2008 13:04


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 4 guests