I'm calling a php script which breaks every time I call a column (which has an url in it example http://www.sample.com/something).
The error which I get is PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4294967296 bytes)
I don't want to solve the problem by extending the memory which I doubt would solve the problem anyways.
The problem appears after I try to execute the prepared statement (after this line of code my script breaks $stmt->execute();
The problems is definitely because of the slash character '/' which is in my url's column. If I call any other column without a '/' sign, the statement executes correctly and the data is rendered.
Here is more of my code:
$stmt = $conn->prepare("
SELECT post.id, content_cite, url FROM post, data
WHERE post.id = data.post_FK AND data.age < ? AND data.age <> ?");
$stmt->bind_param("ii", $one, $two);
// params
$one = 35;
$two = 0;
$stmt->execute();
// select header params
$stmt->bind_result($col_1, $col_2, $col_3);
while ($stmt->fetch()) {
$json = array(
'id' => $col_1,
'content_cite' => $col_2,
'url'=> $col_3
);
array_push($contentArray, $json);
}
As I've said the url column is the problem. If this statement is ran inside an SQL editor it executes without issues.
Any ideas what's happening here?