My script is stopping (just blank, no error message, though that may be my host's settings - A Small Orange) at this line of code:
call_user_func_array(array($stmt, 'bind_result'), refValues($parameters));
Here are the values going into it:
First Array - that is, array($stmt, 'bind_result')
Array
(
[0] => mysqli_stmt Object
(
[affected_rows] => -1
[insert_id] => 0
[num_rows] => 0
[param_count] => 1
[field_count] => 4
[errno] => 0
[error] =>
[error_list] => Array
(
)
[sqlstate] => 00000
[id] => 1
)
[1] => bind_result
)
Parameter for Ref Values
Array
(
[0] =>
[1] =>
[2] =>
[3] =>
)
The odd thing is, it works perfectly well on my local MAMP instance (identical database, basically the same PHP version - MAMP is 5.6.32, A Small Orange is 5.6.35). MAMP's MYSQL is 5.6.38, A Small Orange is 5.5.51-38.2.
The values going into the function are also identical. The MySQLi credentials are valid as the rest of the page has some SELECT queries that work just fine.
Is this an issue with my host or is there something I'm missing? I admit I'm not fluent with MySQLi yet, having grown up on MYSQL and not having time to really get comfortable with the change.
Edit: the newly-shown error code is as follows:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4294967296 bytes) in [REDACTED] on line 171
Now the question is why a relatively simple MYSQL call is using so much memory - it's just selecting a single small row from a tiny little table (256Kib!).