PHP Function makes Apache to crash. Everytime. Help!
Posted: Sat Mar 07, 2009 10:08 am
Hi,
Whenever I use mysqli_stmt_fetch procedural or OO way, Apache crashes.
For instance, the following script crashes:
However, this will not crash:
And this crashes too:
ยจ
It will never output "I am here..." it just displays "Connection Interrupted" and when I look at the Services.msc (I am on Windows x64), the Apache service is not running.
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!
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!