title: Simple PHP Form Not Working - 500 Internal Server Error - Parallels Plesk Panel 9.5
body: <p>I'm stumped why this contact form returns a 500 Internal Server Error. I am 99% sure that my code is immaculate.</p>
  
  <p>I am using Parallels Plesk Panel 9.5 as my hosting admin control panel. I have found Log Manager, and checked in both Access Logs and Error Logs. In Error Logs there are entries for [error] [client 162.247.90.74], [error] [client 184.164.146.26] which say file doesn't exist, and [error] [client 216.21.233.2] which says cannot create or spawn child process.</p>
  
  <p>My HTML form on contact.html:</p>
  
  <pre><code> &lt;form class="form-horizontal" method="post" action="mailer.php" class="form-horizontal" role="form"&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="name" class="col-sm-2"&gt;&lt;small&gt;Name&lt;/small&gt;&lt;/label&gt;
             &lt;div class="col-sm-10"&gt;
                &lt;input type="text" class="form-control" id="inputName" name="inputName" placeholder="Enter your full name" required&gt;
             &lt;/div&gt;
       &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="email" class="col-sm-2"&gt;&lt;small&gt;Email&lt;/small&gt;&lt;/label&gt;
              &lt;div class="col-sm-10"&gt;
                  &lt;input type="email" class="form-control" id="inputEmail" name="inputEmail" placeholder="Enter your email, example@domain.com" required&gt;
              &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="name" class="col-sm-2"&gt;&lt;small&gt;Telephone&lt;/small&gt;&lt;/label&gt;
              &lt;div class="col-sm-10"&gt;
                  &lt;input type="text" class="form-control" id="inputPhone" name="inputPhone" placeholder="Enter your telephone number" required&gt;
              &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="message" class="col-sm-2"&gt;&lt;small&gt;Message&lt;/small&gt;&lt;/label&gt;
              &lt;div class="col-sm-10"&gt;
                  &lt;textarea class="form-control" rows="4" name="inputMessage" id="inputMessage" placeholder="Enter your message here" required&gt;&lt;/textarea&gt;
              &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;p class="antispam"&gt;Leave this empty:
          &lt;br /&gt;&lt;input name="url" /&gt;&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;div class="col-sm-10 col-sm-offset-2"&gt;
              &lt;input style="font-size:22px;" id="submit" name="submit" type="submit" value="Send" class="btn"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The mailer.php document:</p>
  
  <pre><code> &lt;?php
  
   // if the url field is empty
   if(isset($_POST['url']) &amp;&amp; $_POST['url'] == ''){
  
  // then send the form to your email
  mail( 'info@website.com', 'Contact Form', print_r($_POST,true) );
  }
  
  // otherwise, let the spammer think that they got their message through
  
  // redirect to thank you page
  
  header('Location: http://www.website.com/thankyou.html');
  exit('Redirecting you to http://www.website.com/thankyou.html');
  
  ?&gt;
  </code></pre>