I am getting a memory error when running a PHP function.
The error shows as...
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4294967296 bytes)
The PHP script is...
function getPageContent($page) {
//Open a new connection to the MySQL server
$mysqli = new mysqli('localhost','MY_USER','MY_PASS','MY_DATABASE');
$account = MY_ACCOUNT_NUMBER;
$project = 1;
if($stmt=$mysqli->prepare("SELECT content FROM pages WHERE account_id=? AND id=? LIMIT 1")){
$stmt-> bind_param("ii", $account, $page);
// Execute
$stmt-> execute();
// Bind results
$stmt-> bind_result($content);
// Fetch value
while ( $stmt-> fetch() ) {
echo $content;
}
// Close statement
$stmt-> close();
$mysqli-> close();
}
}
It is saying the error has to do with the bind_result function in the PHP code. I am stuck on this. I tried increasing my memory limit in PHP.ini but that did not work and I should not be taking up that much memory anyways.