How can I get the XAMPP control panel to install & start services correctly?

apache, mysql, service, xampp

Solution

It's probably all about privileges, files ACL's etc.

When you start XAMPP in normal mode (not as service) it starts with privileges of user who started it. This is probably your Windows account.

All files owned by your windows account are accessible for XAMPP. So if you create directory "F:\some_dir" it should be accessible for XAMPP in normal mode and there should be no problems, because XAMPP is using your account to access files.

When application is started as service - it uses another windows account (there are 2 accounts used by services by default: LOCAL SERVICE, NETWORK SERVICE). That account probably can't read and write files which belong to your personal windows account.

Account used for specyfic service can be changed. You can run services.msc, select service and go to properties and there should be "Login" tab.

You can also change files/directory permissions and make it available for service account, but i think first solution is better.

Another issue with XAMPP is Control panel, that starts without administrative privileges by default, and it can't control any services, when you starting it from start menu. Some versions of XAMPP after installation will run XAMPP Control Panel with admin privileges, and it works fine until you close that app and start again (without admin privileges).

If you trying to start XAMPP Control Panel and it doesnt ask about admin account - you have to right-click on XAMPP Control Panel icon and click "Run as administrator".

Problem

So recently every time I've tried to install Apache/MySQL/FileZilla as a service on XAMPP, it says something along the line of this: ``` 5:20:18 AM [Apache] Apache Service detected with wrong path 5:20:18 AM [Apache] Change XAMPP Apache settings or 5:20:18 AM [Apache] Uninstall/disable the other service manually first 5:20:18 AM [Apache] Found Path: ERROR: Not Able To Open Service Manager 5:20:18 AM [Apache] Expected Path: "f:\xampp\apache\bin\httpd.exe" -k runservice 5:20:18 AM [Apache] Successful! ``` Afterwards, I can't start the process from the XAMPP panel until I uninstall the service from there and until then the Module name is highlighted red. Although if I leave them installed as a service (red name and all), I can go into the services manager and start them manually and they start fine, and even the XAMPP control panel turns them green and notices they run. This would probably happen for Tomcat as well, I just never use it so I haven't messed with it. All the paths seem to be correct (I do have it on the F drive), but even after countless reinstalls and registry wipe-downs, the XAMPP control does not seem to want to handle installing & running the service correctly. Getting a bit frustrated with this, so thanks in advance for any help.

Original source