0
11:05:16 AM  [Apache]   Apache Service detected with wrong path
11:05:16 AM  [Apache]   Change XAMPP Apache and Control Panel settings or
11:05:16 AM  [Apache]   Uninstall/disable the other service manually first
11:05:16 AM  [Apache]   Found Path: "C:\xampp\apache\bin\httpd.exe" -k runservice
11:05:16 AM  [Apache]   Expected Path: "c:\newxampp\apache\bin\httpd.exe" -k runservice
11:05:16 AM  [mysql]    MySQL Service detected with wrong path
11:05:16 AM  [mysql]    Change XAMPP MySQL and Control Panel settings or
11:05:16 AM  [mysql]    Uninstall/disable the other service manually first
11:05:16 AM  [mysql]    Found Path: C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql
11:05:16 AM  [mysql]    Expected Path: c:\newxampp\mysql\bin\mysqld.exe --defaults-file=c:\newxampp\mysql\bin\my.ini mysql
11:05:16 AM  [mysql]    Problem detected!
11:05:16 AM  [mysql]    Port 3306 in use by "C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql"!
11:05:16 AM  [mysql]    MySQL WILL NOT start without the configured ports free!
11:05:16 AM  [mysql]    You need to uninstall/disable/reconfigure the blocking application
11:05:16 AM  [mysql]    or reconfigure MySQL and the Control Panel to listen on a different port

I want to run 2 xampp on my local server I have install one following the normal installation the other one I changed the folder name to newxampp. I have changed the ports being used by second xampp in httpd.conf as well as the mysql ports.

Questions is why the xampp apache and mysql of the second xampp is not running and getting the above error.

Reason for installing 2 xampp:

I have done projects running in 5.5 php and currently I want to learn to use zend framework but I cant install composer because it needs 5.6 php and up so I installed new xampp with 7.0. I cant just update the old xampp because I have many project using the old version and its hard to update for now

Xampp versions are :

one is v3.2.1 other is v3.2.2 
Giant
  • 1,619
  • 7
  • 33
  • 67
  • 1
    Why do you want to run 2? And not just use vhosts? – Lawrence Cherone Dec 20 '17 at 03:25
  • the main reason is I want to run different version of php. I have done projects running in 5.5 php and currently I want to learn to use zend framework but I cant install composer because it needs 5.6 php and up so I installed new xampp with 7.0. I cant just update the old xampp because I have many project using the old version and its hard to update for now @LawrenceCherone – Giant Dec 20 '17 at 03:27
  • 1
    Fair enough.. though then I think you should look into using docker. Else if you do want to go down this route, you basically go to dive into every config in both apache and mysql and change the ports and paths and run the services manually without the XAMPP tool interfering. – Lawrence Cherone Dec 20 '17 at 03:32
  • @LawrenceCherone I did change the ports in `httpd.conf` and in `my.ini` I think the reason is the one in first line saying wrong path but I dont know where to change the path the line saying `Found Path: "C:\xampp\apache\bin\httpd.exe" -k runservice 11:05:16 AM [Apache] Expected Path: "c:\newxampp\apache\bin\httpd.exe" -k runservice` i search all the config file but all points to the path `c:\newxampp` so i think it is somewhere I havent touch and I dont know – Giant Dec 20 '17 at 03:37
  • @LawrenceCherone as for docker let me check on what it is and see if it maybe an option for me is it another like xampp? – Giant Dec 20 '17 at 03:37
  • Please share more details, like your attempts to resolve the problem. Is this even related to programming, or PHP itself? – Nico Haase Jun 14 '21 at 12:46

7 Answers7

1

You can change the port both servers 80 8080 3306 3307 if you want run servers the same time

Lupitha Yañez C.
  • 354
  • 1
  • 2
  • 7
  • I already changed this like I mention in the OP above. I event changed the ports used in FileZilla – Giant Dec 20 '17 at 03:46
1

I suggest you to use virtual hosts to manage multiple versions of PHP. With virtual hosts you can configure your PHP version that should be used with a specific "htdocs" sub-directory.

This was already answered before here: Is there way to use two PHP versions in XAMPP?

Najt
  • 46
  • 3
0

A workaround may be to install Apache/mysql/php separately instead of the package running a different version.

When I had wamp running I did this and Apache server for both were running.

Google how to Install separately

  • which means I need to uninstall the newxampp and install a new version of php and mysql? – Giant Dec 20 '17 at 03:41
  • Yes uninstall second one that doesn’t work and install the components separately. Go to Apache lounge and download their package install it. Download php and install it. Download mysql package and install it. And use this apache24 as the second one instead of xamp(2) –  Dec 20 '17 at 03:43
  • this could work I going to first try to make my 2 xampp work if not then maybe I will do this one :) – Giant Dec 20 '17 at 03:47
0

You can.
Just change the ports
and you can use one MySQL for both
in my case they are of different versions,
XAMPP 3.2.2 and XAMPP 3.2.1 running different versions of mySQL an PHP.
My point is the versions differences may be the reason why it works for me perhaps because of the processes names in the OS.

USER249
  • 1,080
  • 7
  • 14
  • im using different xampp version one is v3.2.1 other is v3.2.2 – Giant Dec 20 '17 at 04:09
  • I have cahnged the ports in httpd.conf and also in config service settings I have changed to 81. Is there other place I need to change that I missed? I even change `ServerName localhost:81` – Giant Dec 20 '17 at 04:11
  • Try installing them somewhere else than drive c – USER249 Dec 20 '17 at 04:16
  • 81 is wrong because its within reserved range try something like 8080 or 9090 – USER249 Dec 20 '17 at 04:18
  • i forgot to tell you that you can actually use both without changing the ports if you are not running them simultaneously – USER249 Dec 20 '17 at 05:09
  • i tried that I stop apache in xampp and when I start apache in newxampp that one that gets started is the apache in xampp not in newxampp why is that – Giant Dec 20 '17 at 05:25
  • go to newxampp/apache/bin/ and run the httpd.exe – USER249 Dec 20 '17 at 06:10
  • after i run the httpd.exe what should i do? – Giant Dec 20 '17 at 06:12
  • open localhost:8080 on your web browser assuming 8080 is the port – USER249 Dec 20 '17 at 06:35
  • all saved file in my newxampp can be ran this way? I mean I dont need to start it in xampp control this way is ok am i right? – Giant Dec 20 '17 at 06:57
0

I have seen this question asked on multiple occasions, but many times the missing clue is not mentioned. Changing the ports is not enough.

If you rename the xampp folder to something else, you need to run <xamppdir>/setup_xampp.bat to make the new xampp dir work

Oraculo
  • 46
  • 5
0

Excavating long dead thread for anyone who tried to do the same, running two instances of Xampp on the same local machine.

These logs say you're trying to start services (https and mysql) but these are already installed - check your services.msc (Apache2.x and Mysql are already there and they belong to first Xampp instance, check binary paths).

You need to manually install required services and change their names at Control Panel.

Run elevated cmd, cd into second instance of your Xampp and install services manually. For httpd, assuming it is in c:\xampp2 and new name is "Apache2.4_1"

cd \xampp2
cd apache\bin
httpd -k install -n "Apache 2.4_1"
C:\xampp2\apache\bin>httpd.exe -k install -n "Apache2.4_1"
Installing the 'Apache2.4_1' service
The 'Apache2.4_1' service is successfully installed.
Testing httpd.conf....
(my failed here due to some syntax errors generated by lack of coffee)

Next you run control panel (from secondary instance), click "config" in upper-right corner, then "service and port settings" button. In the last window input values as shown at screenshot, save. Then, change your ports in httpd* configs. Start apache, #profit.

enter image description here

Repeat for other services that start as services.

For clarification, I only run two httpd this way. For other services you need to find right cmdline to install service with different name as in httpd and register it in Control Panel with changed names.

apagr
  • 41
  • 3
-1

You can simply delete or stop the apache service (apache2.4) from services in using run > services.msc. And then try to start apache from the xampp control panel.(In my case delete worked.)

Knight017
  • 154
  • 9