Wednesday, March 6, 2013

Run and Install Multiple Xampp Server

Here we Run Multiple Xampp Instance in single computer.one as main and another is a portable xampp server installed in another drive or usb drive.we use two xampp and mysql at a time.

Run Multiple Xampp Server

  • Run Two Xampp at single computer
  • Run Two Mysql Server
  • Use Two Database 

Step For Portable Xampp Configuration(Usb Xampp)

1) G:\xampp\apache\conf\httpd.conf: change code :
ServerName localhost:80 to 
ServerName localhost:8080 
Listen 80 to 
Listen 8080

2) change mysql port 
G:\xampp\mysql\bin\my.ini port = 3306 to port = 3333 
G:\xampp\php\php.ini mysql.default_port = 3306 to mysql.default_port = 3333

3) G:\xampp\apache\conf\httpd.conf: change ssl config:
 LoadModule ssl_module modules/mod_ssl.so to
 #LoadModule ssl_module modules/mod_ssl.so 
LoadModule rewrite_module modules/mod_rewrite.so
 to #LoadModule rewrite_module modules/mod_rewrite.so

4)connect database : localhost to localhost:3333 (mysql port)

 Xample to connect database :

Main Xampp

$my=mysql_connect("localhost","root","rootadmin"); mysql_select_db("test",$my); if($my) { echo "sucessfully connect-main(test)"; }

Portable Xampp

$m=mysql_connect("localhost:3333","root","rootadmin"); mysql_select_db("webauth",$m); if($m) { echo "sucessfully connect portable"; }

No comments:

Post a Comment

Thanks....