How to solve Error: Apache shutdown unexpectedly?
Open Skype.
Tools -> Options -> Advanced -> Connection.
Uncheck the "Use port 80 and 443 for alternatives for incoming connections" checkbox
Sign Out and Close all Skype windows. Try restarting your Apache.
Apache is not running from XAMPP Control Panel ( Error: Apache shutdown unexpectedly. This may be due to a blocked port)
There are many possible answers for this problem. The most common and most likely is that you're running another program which is blocking port 80 or 443. If you've installed Skype, then you've found your problem! Change apache's port settings to 81 and apache will work. There's a good tutorial on that To check this you can open up your command line by clicking the start menu, and typing 'cmd', and enter the command
netstat -nab
this wil return a list of programs that will vaguely resemble this pattern
[someprogram.exe]
UDP [fe80::numbers:numbers:numbers:numbers%numbers]:portnumber
You need to find a line (or lines) ending in :80 and terminate them in order to start apache. If there is no line ending in :80, there are more things you can do.
First, navigate to xampp's directory (default is c:\xampp) and double click apache_start.bat. This will open up a comand line and return more detailed errors about why apache can't run. Mostly, be looking for syntax errors that you could've created by editing your httpd.conf, or httpd-ssl.conf files. This is very easy to do if you've edited it and are a new user.
If still this fails, your last hope is to check the apache error log by clicking on the logs tab in apache's row in the xampp control panel and clicking error log.
If none of this works, don't give up! You got this!
Edit: If you change the port of apache, you will also have to go into httpd.conf (located in xampp/apache/conf) and near line 184, replace
ServerName localhost:80
with
ServerName localhost:81
It is also possible to specify port 81 in the url of your localhost, i.e.
localhost:81/my_project.php
How to solve Error: Apache shutdown unexpectedly?
Open Skype.
Tools -> Options -> Advanced -> Connection.
Uncheck the "Use port 80 and 443 for alternatives for incoming connections" checkbox
Sign Out and Close all Skype windows. Try restarting your Apache.
Apache shutdown unexpectedly
on your XAMPP control panel, next to apache, select the "Config" option and select the first file (httpd.conf):
there, look for the "listen" line (you may use the find tool in the notepad) and there must be a line stating "Listen 80". Note: there are other lines with "listen" on them but they should be commented (start with a #), the one you need to change is the one saying exactly "listen 80". Now change it to "Listen 1337".
Start apache now.
If the error subsists, it's because there's another port that's already in use. So, select the config option again (next to apache in your xampp control panel) and select the second option this time (httpd-ssl.conf):
there, look for the line "Listen 443" and change it to "Listen 7331".
Start apache, it should be working now.
Related Topics
How to Alias a Function in PHP
PHP Simple Foreach Loop with HTML
How to Export HTML Table to Excel or PDF in PHP
Remotely Destroy a Session in PHP (User Logs in Somewhere Else)
PHP Linefeeds (\N) Not Working
PHP Crop Image to Fix Width and Height Without Losing Dimension Ratio
How to Install Pdo_Sqlsrv on My Windows 2008 Server 2008 R2
Handling If-Modified-Since Header in a PHP-Script
Unexpected T_Encapsed_And_Whitespace, Expecting T_String or T_Variable or T_Num_String Error
How to Echo the Whole Content of a .HTML File in PHP
Generating a Screenshot of a Website Using Jquery
What Is the Best Practice to Use When Using PHP and HTML
Select Random File from Directory
Executing a Powershell Script from PHP
PHP Foreach by Reference Causes Weird Glitch When Going Through Array of Objects