PHP Using PHP with MySQL Connecting PHP to MySQL Installing MySQL with MAMP

Problem 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

This happens sometimes, give this a try:

  1. Click "Config" button
  2. Select "httpd.conf" from the dropdown.
  3. On the line where it says "Listen 80" change that to "Listen8080"
  4. Save the file.
  5. Close the file.
  6. Open browser and type " localhost:8080 "
  7. Smile because it worked.

1: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.

I tried to follow what you said and this is what i got.

Is there a space in Listen8080? It should be Listen 8080.

Try 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.

2: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...

Cool, 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.

thanks Jeffrey, that works how do i open the localhost in the browser.

<?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 :-(

when I open the index.php that is what it is showing me.

That 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!

Let 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.

<?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 :-(

<?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 :-(