Running XAMPP and MAMP on same Windows 10 localhost

86 Views Asked by At

I'm trying to establish a MAMP Joomla 4 test environment to use alongside my primary XAMPP Joomla 4 development environment. The two might run concurrently.

XAMPP runs too slow on my PC and I'm out of hardware and software upgrade options, so Im looking to MAMP.

I am at the 'login data' screen of the Joomla installer for the MAMP install. Before proceeding I tried to access my installed XAMPP site but 127.0.0.2 is refusing to connect.

In an attempt to differentiate the XAMPP from MAMP sites the following changes were made to XAMPP files before attempting to access the primary site (from Wamp and xampp on same machine) to the XAMPP files:

  1. Change xampp apache port 80 to example 8080 in httpd.conf from directory C:\xampp\apache\conf

  2. In my.ini from C:\xampp\mysql\bin change port=3306 to port=3307

  3. In config.inc.php from C:\xampp\phpMyAdmin after this code:

$cfg['Servers'][$i]['AllowNoPassword'] = true;

add this code:

$cfg['Servers'][$i]['port'] = '3307';

There is a section in thread after these change recommendations that I didn't understand how to implement it:

"4. restart xampp now we cab use xampp and wamp for example use this code in xampp port 3307 for connection database:

$servername = "localhost";
$username = "root";
$password = "";
$dbname = "my_db";
$port = '3307';

$conn = mysqli_connect($servername, $username, $password, $dbname,$port);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}

$sql = "SELECT id, name FROM users";
$result = mysqli_query($conn, $sql);

if (mysqli_num_rows($result) > 0) {
   while($row = mysqli_fetch_assoc($result)) {
    echo "id: " . $row["id"]. " - Name: " . $row["name"]. "<br>";
   }
 } else 
     echo "0 results";

mysqli_close($conn);"

Slow or not, I don't want to mess up my development capabilities. Any help, especially next steps, is appreciated...RA

I've tried installing Laragon but it failed out at the installation of Joomla 4 zip and then tar files.

I've searched for XAMPP and MAMP installs on the same localhost and the closest was the Stackoverflow XAMPP/ WAMP post referenced. As above, changes were made in accordance with that post.

0

There are 0 best solutions below