53

I am facing a problem with my Xampp control panel. Once I try to launch it, it pops out an error message saying:

"Error:Cannot create file "C:\xampp\xampp-control.ini". Access denied.

The version I installed is xampp-win32-5.6.23. When I try to start the apache module, below is the log respnse:

7:53:14 PM  [Apache]    Attempting to start Apache app...
7:53:15 PM  [Apache]    Status change detected: running
7:53:17 PM  [Apache]    Status change detected: stopped
7:53:17 PM  [Apache]    Error: Apache shutdown unexpectedly.
7:53:17 PM  [Apache]    This may be due to a blocked port, missing dependencies, 
7:53:17 PM  [Apache]    improper privileges, a crash, or a shutdown by another method.
7:53:17 PM  [Apache]    Press the Logs button to view error logs and check
7:53:17 PM  [Apache]    the Windows Event Viewer for more clues
7:53:17 PM  [Apache]    If you need more help, copy and post this
7:53:17 PM  [Apache]    entire log window on the forums
vishal
  • 81
  • 1
  • 2
  • 13
Sahar Alsadah
  • 2,580
  • 3
  • 19
  • 25

1 Answers1

149

My problem was solved by just running the app as an administrator.

Right click the xampp control panel> run as administrator.

Sahar Alsadah
  • 2,580
  • 3
  • 19
  • 25
  • 2
    In a normal case, the control panel starts and one need not run as administrator. However if you want to make changes in the configuration and save the changes (e.g. to have Apache turn on automatically) the you will see this error. In that case run as administrator just once and save the configuration. After that you can run normally. – Ambar Chatterjee Nov 02 '20 at 04:14
  • 18
    Xampp-control.ini for some reasons become 'read only'. Just change it to 'full control – Hadayat Niazi Nov 12 '20 at 12:24
  • 3
    Right-click on this shortcut and choose `Properties` (you may have a Properties icon on the Menu bar - if so, click that instead). If not already there, click on the Shortcut tab in Properties. Click the `Advanced` button In the dialog that opens, check the box next to `Run as Administrator` **Now it will always run as admin** – CodeToLife Nov 23 '20 at 22:02
  • 6
    As per HadiNiazi's comment, search for `xampp-control.ini` in the xampp folder. It should be the one in the xampp folder. Right-click it, go to Properties > Security > Edit. From there, allow Full Control for Everyone, then save the settings. That fixed the error for me. – HartleySan Feb 01 '21 at 20:39
  • 3
    I'd rather do the solution @HadiNiazi and HartleySan suggested. Giving everyone full access to a .ini seems much safer than letting a program always run in admin mode. – Déjà vu Jun 27 '21 at 22:26