title: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes) Looked at answer? Still not working
body: <p>Recently I've been trying to code a simplistic login system for my website, with a lot of errors I have been facing it seems to be going back and forth in unsurety for what to do.</p>
  
  <p>The error message that I am receiving is <code>Allowed memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes) on line 17 of index.php</code> 
  I had a look on stackoverflow to see what the cause of the problem might be, and I tried the answer found here </p>
  
  <p><a href="https://stackoverflow.com/questions/18121619/allowed-memory-size-of-134217728-bytes-exhausted-tried-to-allocate-4294967296-b">Allowed memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes)</a></p>
  
  <p>But sadly changing <code>longtext</code> to <code>mediumtext</code> in phpmyadmin still had no effect, In fact it stopped returning any error_log and just reloaded my webpage! If you head over to beastfox.com You can see that all that happens is when entering my test username and password that I have added to the database (username:Username password:Password) It causes a HTTP ERROR 500.</p>
  
  <p>I am slightly unsure of what to do, since it apparently has something to do with my index.php I have listed the code as shown below,</p>
  
  <pre><code>&lt;?php
     include("database.php");
     session_start();
  
     if($_SERVER["REQUEST_METHOD"] == "POST") {
        // Create querystring
        $sql = "SELECT password FROM admin WHERE username = ?";
  
        // Prepare, bind, execute
         if (!$stmt = mysqli_prepare($mysqli,$sql)) {
      echo "Failed to prepare:".mysqli_error($mysqli);
      return;
  }
        $stmt = mysqli_prepare($mysqli,$sql);
        mysqli_stmt_bind_param($stmt, 's', $_POST['username']);
        mysqli_stmt_execute($stmt);
        mysqli_stmt_bind_result($stmt, $user_password);
        if (mysqli_stmt_fetch($stmt)) {
           // Validate password
           if (password_verify($_POST['password'], $user_password)) {
               session_register("username");
               $_SESSION['login_user'] = $username;
  
               header("location: myaccount.php");
              exit;
           } else {
               $error = "Your Login Name or Password is invalid";
           }
        mysqli_stmt_close($stmt);
        } else {
           $error = "Your Login Name or Password is invalid";
        }
     }
  ?&gt;
  </code></pre>
  
  <p>And according to the error_log it says its due to line 17
  (<code>mysqli_stmt_bind_result($stmt, $user_password);</code>)</p>
  
  <p>As in the other persons stack overflow here i'll list my version etc</p>
  
  <p>PHP Version: 5.6</p>
  
  <p>libmysql - 5.1.73:</p>
  
  <p>memory_limit: 168M</p>
  
  <p>Thanks a billion if you think you have any ideas on what the problem is!</p>
  
  <p>If anything else is needed I will honestly try anything,</p>
  
  <p>I will keep looking just incase but currently everything I have tried does not seem to be working.</p>