0

I am a beginner to xampp. Every time I start XAMPP control panel, I see a list of errors in the log box. Here is an example:

14:58:16  [main]    Initializing Control Panel
14:58:16  [main]    Windows Version: Windows 7 Professional SP1 64-bit
14:58:16  [main]    XAMPP Version: 7.1.16
14:58:16  [main]    Control Panel Version: 3.2.2  [ Compiled: Nov 12th 2015 ]
14:58:16  [main]    Running with Administrator rights - good!
14:58:16  [main]    XAMPP Installation Directory: "c:\program files (x86)\xampp\"
14:58:16  [main]    WARNING: Your install directory contains spaces.  This may break programs/scripts
14:58:16  [main]    WARNING: Your install directory contains special characters.  This may break programs/scripts
14:58:16  [main]    Checking for prerequisites
14:58:41  [main]    All prerequisites found
14:58:41  [main]    Initializing Modules
14:58:41  [Apache]  Problem detected!
14:58:41  [Apache]  Port 80 in use by "Unable to open process" with PID 4!
14:58:41  [Apache]  Apache WILL NOT start without the configured ports free!
14:58:41  [Apache]  You need to uninstall/disable/reconfigure the blocking application
14:58:41  [Apache]  or reconfigure Apache and the Control Panel to listen on a different port
14:58:41  [main]    The FileZilla module is disabled
14:58:41  [main]    The Mercury module is disabled
14:58:41  [main]    The Tomcat module is disabled
14:58:41  [main]    Enabling autostart for module "Apache"
14:58:41  [main]    Enabling autostart for module "MySQL"
14:58:41  [main]    Starting Check-Timer
14:58:41  [main]    Control Panel Ready
14:58:42  [Apache]  Autostart active: starting...
14:58:42  [Apache]  Problem detected!
14:58:42  [Apache]  Port 80 in use by "Unable to open process" with PID 4!
14:58:42  [Apache]  Apache WILL NOT start without the configured ports free!
14:58:42  [Apache]  You need to uninstall/disable/reconfigure the blocking application
14:58:42  [Apache]  or reconfigure Apache and the Control Panel to listen on a different port
14:58:42  [Apache]  Attempting to start Apache service...
14:58:42  [mysql]   Autostart active: starting...
14:58:42  [mysql]   Attempting to start MySQL service...
14:58:44  [mysql]   Status change detected: running
14:58:49  [mysql]   Status change detected: stopped
14:58:49  [mysql]   Error: MySQL shutdown unexpectedly.
14:58:49  [mysql]   This may be due to a blocked port, missing dependencies, 
14:58:49  [mysql]   improper privileges, a crash, or a shutdown by another method.
14:58:49  [mysql]   Press the Logs button to view error logs and check
14:58:49  [mysql]   the Windows Event Viewer for more clues
14:58:49  [mysql]   If you need more help, copy and post this
14:58:49  [mysql]   entire log window on the forums
14:59:22  [mysql]   Attempting to start MySQL service...
14:59:24  [mysql]   Status change detected: running
14:59:28  [mysql]   Status change detected: stopped
14:59:28  [mysql]   Error: MySQL shutdown unexpectedly.
14:59:28  [mysql]   This may be due to a blocked port, missing dependencies, 
14:59:28  [mysql]   improper privileges, a crash, or a shutdown by another method.
14:59:29  [mysql]   Press the Logs button to view error logs and check
14:59:29  [mysql]   the Windows Event Viewer for more clues
14:59:29  [mysql]   If you need more help, copy and post this
14:59:29  [mysql]   entire log window on the forums

I am also attaching the screenshots of service settings of Apache and MySQL below: Can someone help me in identifying and correcting these errors. Should I reinstall Xampp? Please answer.

john day
  • 3
  • 3
  • `Port 80 in use by "Unable to open process" with PID 4!` explains the problem with Apache.. – Romeo Sierra Apr 24 '18 at 10:11
  • Errors with MySQL, you should look in the logs. `Press the Logs button to view error logs and check` gives a clue on that.. Check them and post what you see there.. – Romeo Sierra Apr 24 '18 at 10:13
  • Hi i am john. If my port 80 is in use, what should i do? Which port should i configure? – john day Apr 24 '18 at 10:19

1 Answers1

1

Port 80 in use by "Unable to open process" with PID 4!

To change the port number open the file

[XAMPP Installation Folder]/apache/conf/httpd.conf

Search for the string ‘Listen’ and ServerName and update the port number

Or close the program that's using port 80 you can check that using this command

C:> netstat -a -b

usually Skype..

Tarek
  • 708
  • 5
  • 14
  • I receive this error only when i turn on the iis services feature from the windows control panel. Otherwise i receive the same error for apache as in case of mysql. – john day Apr 24 '18 at 10:33
  • should i refer to the solution given at https://stackoverflow.com/questions/18022809/xampp-mysql-shutdown-unexpectedly – john day Apr 24 '18 at 10:46
  • Okay john! You know the problem then. IIS is the one which is holding on to the port number 80. You either disable IIS, or change the port number for Apache HTTPD. Either one is possible... – Romeo Sierra Apr 25 '18 at 02:37
  • thanks a lot for your support. I changed apache's main port to 81 and restarted xampp service. Now its working well with mysql. Thanks – john day Apr 25 '18 at 03:45