Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMUZ141140 Dennis Pomerai
10,215 PointsProblem detected! 4:03:19 PM [Apache] Port 80 in use by "Unable to open process" with PID 4!
I have installed xampp on my machine and it give me that the port is in use. I dont know what to do next.
11 Answers
Jeffrey Pavlov
16,191 PointsThis happens sometimes, give this a try:
- Click "Config" button
- Select "httpd.conf" from the dropdown.
- On the line where it says "Listen 80" change that to "Listen8080"
- Save the file.
- Close the file.
- Open browser and type " localhost:8080 "
- Smile because it worked.
MUZ141140 Dennis Pomerai
10,215 Points1:43:08 PM [Apache] Attempting to start Apache app... 1:50:26 PM [Apache] Problem detected! 1:50:26 PM [Apache] Port 80 in use by "Unable to open process" with PID 8852! 1:50:26 PM [Apache] Apache WILL NOT start without the configured ports free! 1:50:26 PM [Apache] You need to uninstall/disable/reconfigure the blocking application 1:50:26 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port 1:50:26 PM [Apache] Problem detected! 1:50:26 PM [Apache] Port 443 in use by "Unable to open process" with PID 8852! 1:50:26 PM [Apache] Apache WILL NOT start without the configured ports free! 1:50:26 PM [Apache] You need to uninstall/disable/reconfigure the blocking application 1:50:26 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port 1:50:26 PM [Apache] Attempting to start Apache app... 1:50:26 PM [Apache] Status change detected: running 1:50:27 PM [Apache] Status change detected: stopped 1:50:27 PM [Apache] Error: Apache shutdown unexpectedly. 1:50:27 PM [Apache] This may be due to a blocked port, missing dependencies, 1:50:27 PM [Apache] improper privileges, a crash, or a shutdown by another method. 1:50:27 PM [Apache] Press the Logs button to view error logs and check 1:50:27 PM [Apache] the Windows Event Viewer for more clues
[Sat Sep 12 11:55:08.191049 2015] [ssl:warn] [pid 8852:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Sat Sep 12 11:55:08.928542 2015] [ssl:warn] [pid 8852:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Sat Sep 12 11:55:16.124712 2015] [mpm_winnt:notice] [pid 8852:tid 428] AH00455: Apache/2.4.16 (Win32) OpenSSL/1.0.1p PHP/5.6.11 configured -- resuming normal operations [Sat Sep 12 11:55:16.124712 2015] [mpm_winnt:notice] [pid 8852:tid 428] AH00456: Apache Lounge VC11 Server built: Jul 12 2015 10:56:48 [Sat Sep 12 11:55:16.124712 2015] [core:notice] [pid 8852:tid 428] AH00094: Command line: 'C:\xampp\apache\bin\httpd.exe -d C:/xampp/apache' [Sat Sep 12 11:55:16.177747 2015] [mpm_winnt:notice] [pid 8852:tid 428] AH00418: Parent: Created child process 6904 [Sat Sep 12 11:55:17.519641 2015] [ssl:warn] [pid 6904:tid 472] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Sat Sep 12 11:55:17.723029 2015] [ssl:warn] [pid 6904:tid 472] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Sat Sep 12 11:55:17.916157 2015] [mpm_winnt:notice] [pid 6904:tid 472] AH00354: Child: Starting 150 worker threads.
MUZ141140 Dennis Pomerai
10,215 PointsI tried to follow what you said and this is what i got.
Jeffrey Pavlov
16,191 PointsIs there a space in Listen8080? It should be Listen 8080.
Jeffrey Pavlov
16,191 PointsTry this: Listen 7777 ServerName localhost:7777
Scan that file and replace 80 or 8080 with 7777 , that port shouldn't be in use. Then give it a restart. Let me know how it works out.
MUZ141140 Dennis Pomerai
10,215 Points2:15:52 PM [main] Initializing Control Panel 2:15:52 PM [main] Windows Version: Windows 8 Pro 64-bit 2:15:52 PM [main] XAMPP Version: 5.6.11 2:15:52 PM [main] Control Panel Version: 3.2.1 [ Compiled: May 7th 2013 ] 2:15:52 PM [main] You are not running with administrator rights! This will work for 2:15:52 PM [main] most application stuff but whenever you do something with services 2:15:52 PM [main] there will be a security dialogue or things will break! So think 2:15:52 PM [main] about running this application with administrator rights! 2:15:52 PM [main] XAMPP Installation Directory: "c:\xampp\" 2:15:53 PM [main] Checking for prerequisites 2:15:53 PM [main] All prerequisites found 2:15:53 PM [main] Initializing Modules 2:15:53 PM [mysql] XAMPP MySQL is already running on port 3306 2:15:53 PM [main] Enabling autostart for module "Apache" 2:15:53 PM [main] Starting Check-Timer 2:15:53 PM [main] Control Panel Ready 2:15:53 PM [Apache] Autostart active: starting... 2:15:53 PM [Apache] Attempting to start Apache app... 2:15:55 PM [Apache] Attempting to start Apache app... 2:15:55 PM [Apache] Status change detected: running 2:15:55 PM [Apache] Status change detected: stopped 2:15:55 PM [Apache] Error: Apache shutdown unexpectedly. 2:15:55 PM [Apache] This may be due to a blocked port, missing dependencies, 2:15:55 PM [Apache] improper privileges, a crash, or a shutdown by another method. 2:15:55 PM [Apache] Press the Logs button to view error logs and check 2:15:55 PM [Apache] the Windows Event Viewer for more clues 2:15:55 PM [Apache] If you need more help, copy and post this 2:15:55 PM [Apache] entire log window on the forums 2:15:58 PM [Apache] Attempting to start Apache app...
Jeffrey Pavlov
16,191 PointsCool, almost there. Close down xampp, and open it with Admin Rights. Instead of opening it by double clicking, right click on the xampp icon, from the context menu select run as admin, and give the start up a try.
MUZ141140 Dennis Pomerai
10,215 Pointsthanks Jeffrey, that works how do i open the localhost in the browser.
MUZ141140 Dennis Pomerai
10,215 Points<?php if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) { $uri = 'https://'; } else { $uri = 'http://'; } $uri .= $_SERVER['HTTP_HOST']; header('Location: '.$uri.'/dashboard/'); exit; ?> Something is wrong with the XAMPP installation :-(
MUZ141140 Dennis Pomerai
10,215 Pointswhen I open the index.php that is what it is showing me.
Jeffrey Pavlov
16,191 PointsThat sucks! You can clean that up and reinstall it. Chances are you will run into the same issues with the ports, and remember to run it in with admin rights. Good luck!
Jeffrey Pavlov
16,191 PointsLet me know if you get this going. If not, I can always document the steps and post them to my blog so you and others can use them.
MUZ141140 Dennis Pomerai
10,215 Points<?php if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) { $uri = 'https://'; } else { $uri = 'http://'; } $uri .= $_SERVER['HTTP_HOST']; header('Location: '.$uri.'/dashboard/'); exit; ?> Something is wrong with the XAMPP installation :-(
MUZ141140 Dennis Pomerai
10,215 Points<?php if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) { $uri = 'https://'; } else { $uri = 'http://'; } $uri .= $_SERVER['HTTP_HOST']; header('Location: '.$uri.'/dashboard/'); exit; ?> Something is wrong with the XAMPP installation :-(