I have a bunch of client point of sale (POS) systems that periodically send new sales data to one centralized database, which stores the data into one big database for repor
I spent two dyas looking a solution for this and I figured out that this was cause in a call with PDO when I called
$stmt->bindParam(":PERIOD", $period);
and the variables period was an
empty string ''
So this issue could have multiple root cause, my advice to you is that try a trial and error or a bisection method for a root cause finding, delete code and the try to search what is the line code that is failing
Update: I also faced this error with the method $pdo->query() I used $pdo->prepare() and worked well, so, while I had
$sql = "SELECT * FROM COURSE_DETAILS where ACTIVE = 1 AND COURSE_DETAILS_ID = $id";
$stmt = getConnection()->query($sql);
$courseDetails = $stmt->fetchAll(PDO::FETCH_ASSOC)
then i changed this to
$sql = "SELECT * FROM COURSE_DETAILS where ACTIVE = 1 AND COURSE_DETAILS_ID = ?";
$stmt = getConnection()->prepare($sql);
$stmt->execute(array($id));
and magically the memory error dissapeared!