title: PHP blank white page, no errors
body: <p>I have a PHP page that I developed locally and worked fine. Upon uploading it to a server I now just get a blank white screen? It is the exact same code, works fine locally but doesnt remotely. I have tried setting on error reporting but that still doesn t give me any errors, just a blank white screen.</p>
  <p>The code:</p>
  <pre><code>    $firstname = $phone = $email = $picture = $sqlcon = &quot;&quot;;
      $firstnameErr = $phoneErr = $emailErr = $pictureErr = $sqlErr = $filterErr = &quot;&quot;;
      $statusmsg = &quot;&quot;;
      $newpicture = $registered = &quot;false&quot;;
      
      if ($_SERVER[&quot;REQUEST_METHOD&quot;] == &quot;POST&quot;) {
      
          // If the user has not entered a firstname and has not entered details previously
          if ((empty($_POST[&quot;firstname&quot;])) &amp;&amp; empty($_POST[&quot;hfirst&quot;])) {
          
              $firstnameErr = &quot;Firstname is required for submission&quot;;
          }
          else {
          
              if (!empty($_POST[&quot;firstname&quot;])) {
              
                  $firstname = $_POST[&quot;firstname&quot;];
              }
              else {
              
                  $firstname = $_POST[&quot;hfirst&quot;];
              }
              
              if (!preg_match(&quot;/^[a-zA-Z ]*$/&quot;, $firstname)) { 
              
                  $firstnameErr=&quot;Please ensure you have entered only characters for your first name&quot;;
              }
          }
          
          // If the user has not entered a phone number and has not entered details previously
          if ((empty($_POST[&quot;phone&quot;])) &amp;&amp; (empty($_POST[&quot;hphone&quot;]))) {
          
              $phoneErr = &quot;Please ensure you have entered a phone number&quot;; 
          }
          else {
          
              if (!empty($_POST[&quot;phone&quot;])) {
              
                  $phone = $_POST[&quot;phone&quot;];
              }
              else {
              
                  $phone = $_POST[&quot;hphone&quot;];
              }
              
              if (!is_numeric($phone)) {
                  
                  $phoneErr = &quot;Please ensure you have entered a valid phone number&quot;;
              }
          }
          
          if ((empty($_POST[&quot;email&quot;])) &amp;&amp; (empty($_POST[&quot;hemail&quot;]))) {
          
              $emailErr = &quot;Please ensure you have entered your email address&quot;;
          }
          else {
          
              if (!empty($_POST[&quot;email&quot;])) {
              
                  $email = $_POST[&quot;email&quot;];
              }
              else {
              
                  $email = $_POST[&quot;hemail&quot;];
              }
              
              if (!preg_match(&quot;/([\w\-]+\@[\w\-]+\.[\w\-]+)/&quot;, $email)) {
              
                  $emailErr = &quot;Please ensure you have entered a valid email address&quot;;
              }
          }
          
          if ((empty($_FILES[&quot;file&quot;][&quot;name&quot;])) &amp;&amp; (empty($_POST[&quot;hfile&quot;]))) {
          
              $pictureErr = &quot;Please ensure you have selected a picture to upload&quot;;
          }
          else {
          
              if (!empty($_FILES[&quot;file&quot;][&quot;name&quot;])) {
              
                  if ($_FILES[&quot;file&quot;][&quot;size&quot;] &gt; 1048576) {
                      
                          $pictureErr = &quot;The maximum size for a picture is 1mb&quot;;
                  }
                  else {
                      
                      // Ensure the user has selected a file of accepted type
                      $temp = explode(&quot;.&quot;, $_FILES[&quot;file&quot;][&quot;name&quot;]);
                      $ext = end($temp);
                      $allowedExt = array (&quot;gif&quot;, &quot;JPEG&quot;, &quot;jpg&quot;, &quot;png&quot;, &quot;JPG&quot;);
                          
                      if (!in_array($ext, $allowedExt)) {
                          
                          $pictureErr = &quot;Please ensure you have uploaded an image file&quot;;                              
                              
                      }
                  }
                  
                  $newpicture = &quot;true&quot;;
                  $picture = $_FILES[&quot;file&quot;][&quot;name&quot;];
                  
              }
              else {
  
                  $picture = $_POST[&quot;hpicture&quot;];
              }
          }
          
          $sqlcon = mysqli_connect(&quot;localhost&quot;, &quot;USER&quot;, &quot;PASS&quot;, &quot;personneldb&quot;);
          
          if (mysqli_connect_errno()) {
                      
              $sqlErr = &quot;Could not connect to database&quot;;
              mysqli_close($sqlcon);
          }
          
          if ($newpicture == &quot;true&quot;) {
          
              if (!move_uploaded_file($_FILES[&quot;file&quot;][&quot;tmp_name&quot;], &quot;./upload/&quot;.$_FILES[&quot;file&quot;][&quot;name&quot;])) {
                  
                  $pictureErr = &quot;File could not be uploaded&quot;;
              }
          }
          
          if ((empty($firstnameErr)) &amp;&amp; (empty($emailErr)) &amp;&amp; (empty($phoneErr)) &amp;&amp; (empty($pictureErr == &quot;&quot;)) &amp;&amp; (empty($sqlErr == &quot;&quot;))) {
          
              mysqli_query($sqlcon, &quot;INSERT INTO test2Details(Firstname, Phone, Email, ImageName)
              VALUES ('$firstname', '$phone', '$email', '$picture')&quot;);
                      
              // Display status message
              $statusmsg = &quot;Success! Your details and picture have been uploaded and stored&quot;; 
              
  
          }
          
          if ((!empty($firstname)) &amp;&amp; (!empty($phone)) &amp;&amp; (!empty($email)) &amp;&amp; (!empty($picture))) {
          
              $registered = &quot;true&quot;;
          }
          else {
          
              $registered = &quot;false&quot;;
          }
          
          
      }
      
  </code></pre>