logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: mysql query crashes apache
Author
mattman059



Joined: 11 Dec 2008
Posts: 2

PostPosted: Thu 11 Dec '08 23:56    Post subject: mysql query crashes apache Reply with quote

Code:

$query  = "SELECT ID,password FROM users";
$result = mysql_query($query);

while($row = mysql_fetch_array($result))
{
    echo $row["ID"];
    echo $row["password"];
    echo "<br />";

}
mysql_free_result($result);


This code will crash my apache webserver, but if i comment out one of the echo statements like so:

Code:

$query  = "SELECT ID,password FROM users";
$result = mysql_query($query);

while($row = mysql_fetch_array($result))
{
    echo $row["ID"];
    //echo $row["password"];
    echo "<br />";

}
mysql_free_result($result);


it works just fine
Any ideas how this is happening?

I am using:
Apache 2.2.9.0
PHP 5.2.7.7
mySQL 5.1


Thank you for your help



EDIT:
Now it seems that even commenting out that line causes apache to crash..so now even one echo statement causes the crash
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 12 Dec '08 19:13    Post subject: Reply with quote

There are some bugs in PHP 5.2.7 with quotes ( " ). So great up to 5.2.8! That is my first guess. PHP 5.2.7 has been removed as release from the PHP group.

If you still have a problem after upgrading enable the php error log.

log_errors = On
error_log = C:/php5/phperror.log
Back to top
mattman059



Joined: 11 Dec 2008
Posts: 2

PostPosted: Fri 12 Dec '08 23:40    Post subject: Reply with quote

Thanks a lot, it seems to be working okay now. I'll post if i come across any other problems.
Back to top


Reply to topic   Topic: mysql query crashes apache View previous topic :: View next topic
Post new topic   Forum Index -> Other Software