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.
XAMPP and WampServer are both free packages of WAMP, with additional applications/tools, put together by different people. Their differences are in the format/structure of the package, the configurations, and the included management applications.
As two different versions of XAMPP cannot run on the same port, we need to change to the port. Steps to change the port for the XAMPP1_8_2: Open the file HTTP CONF file > change the port from the 80 to 8080. After changing the port click on save and exit.
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:
httpd.conf
from
directory C:\xampp\apache\conf
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);
WAMP and XAMPP are basically the same thing i.e. Apache MySQL and PHP so if one is running it's Apache will have captured port 80, so the second one wont be able to get to port 80, ditto one's MySQL server will have captured port 3306 so the others wont run.
Why do you need to install XAMPP to get an old version of PHP running, WAMPServer is designed to allow you to switch between multiple versions of Apache/MySQL and PHP fairly easily.
But now you have done it, just make sure that the Apache and MySQL services from XAMPP are set to start manually and also Wampservers [wampapache] and [wampmysqld] services as well. then just run only one of them at any one time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With