title: How to fix XAMPP "Apache / mysql shutdown unexpectedly" error
body: <p>I was setting up a PHP server because I wrote some PHP code:
  I  opened XAMPP and it said:</p>
  
  <blockquote>
    <p>18:36:08  [Apache]    Error: Apache shutdown unexpectedly.</p>
    
    <p>18:36:08  [Apache]    This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. </p>
    
    <p>18:36:08  [Apache]    Press the Logs button to view error logs and check the Windows Event Viewer for more clues</p>
    
    <p>18:36:08  [Apache]    If you need more help, copy and post this entire log window on the forums</p>
    
    <p>18:36:23  [mysql]     Status change detected: stopped</p>
    
    <p>18:36:23  [mysql]     Error: MySQL shutdown unexpectedly.</p>
    
    <p>18:36:23  [mysql]     This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method.</p>
    
    <p>18:36:23  [mysql]     Press the Logs button to view error logs and check the Windows Event Viewer for more clues</p>
    
    <p>18:36:23  [mysql]     If you need more help, copy and post this entire log window on the forums</p>
  </blockquote>
  
  <p>What is happening???</p>