Wamp and xampp on same machine
apache, wamp, xampp
Solution
for run xampp and wamp in same computer you can use this tutorial from arasjoomla website: http://arasjoomla.ir/joomla-tutorial/how-to-run-xampp-and-wamp-on-same-computer for example we used wamp with default port and setting and set changed in xampp:
- Change xampp apache port 80 to example 8080 in `httpd.conf` from directory `C:\xampp\apache\conf`
- In `my.ini` from `C:\xampp\mysql\bin` change `port=3306` to `port=3307`
In `config.inc.php` from `C:\xampp\phpMyAdmin` after this code:
`$cfg['Servers'][$i]['AllowNoPassword'] = true;`
add this code:
`$cfg['Servers'][$i]['port'] = '3307';`
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);
Problem
I use wamp2.2 for all the time, but i had to install xamp1.6.8 cause i've got to work with project created for old php version. Xamp installation goes fine but when i run it i cant get localhost site. Ive got blank page with favicon of wamp and comunicate that site is unavaible. I know that this is configuration case. Anybody know how to fix this? I want to run only one of them at once, and i have configured some virtualhosts for wamp they dont have to be accesible while xamp is running i need xamp only for one project.