title: php - 000webhost 500 internal server error and application error
body: <p>so i was following a video uploading image from android to server, but im using the web server called "000webhost", i tested the url and it gives me a generic error "Application error". so i tested it on postman, now it gives me "500 Internal Server Error", i removed the header and the error was gone on both sides but it doesn't do anything.</p>
  
  <pre><code>&lt;?php
  
   header('Content-type : bitmap; charset=utf-8');
  
  if(isset($_POST["encoded_string"])){
      $encoded_string = $_POST["encoded_string"];
      $image_name = $_POST["image_name"];
  
      $decoded_string = base64_decode($encoded_string);
  
      $path = 'images/'.$image_name;
  
      $file = fopen($path, 'wb');
  
      $is_written = fwrite($file, $decoded_string);
      fclose($file);
  
      if($is_written &gt; 0){
          $connection = new mysqli('localhost','id7794597_razzlesz','hahayz9090','id7794597_memes');
          $query = "INSERT INTO photos (name,path) values ('$image_name','$path');";
  
          $result = mysqli_query($connection, $query);
  
          if($result){
              echo "success";
              }else{
                  echo "failed";
              }
              mysqli_close($connection);
      }
  }
  </code></pre>
  
  <p>?></p>