Whenever I use mysqli_stmt_fetch procedural or OO way, Apache crashes.
For instance, the following script crashes:
Code: Select all
$c = mysqli_connect('localhost','root','pass','test');
if ($stmt = mysqli_prepare($c,'SELECT username FROM admins WHERE id=1'))
{
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt,$a);
mysqli_stmt_fetch($stmt);
mysqli_stmt_close();
}Code: Select all
$c = mysqli_connect('localhost','root','pass','test');
if ($stmt = mysqli_prepare($c,'SELECT username FROM admins WHERE id=1'))
{
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt,$a);
die('I am here...');
mysqli_stmt_fetch($stmt);
mysqli_stmt_close();
}¨
Code: Select all
$c = mysqli_connect('localhost','root','pass','test');
if ($stmt = mysqli_prepare($c,'SELECT username FROM admins WHERE id=1'))
{
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt,$a);
mysqli_stmt_fetch($stmt);
die('I am here...');
mysqli_stmt_close();
}I am running PHP 5.2.8 x64 and I also tried PHP 5.2.5 x64, but no difference. Newest version is 5.2.9, but it does not say it fixes this problem and I am unable to use 5.2.9, because I cannot find compiled x64 versions of it... and no I don't have the time to setup VS and all to compile it myself. I am running MySQL 5.1.
This is frustrating, I really need that to work!