[phpa] Info on MySQL Driver/PHP 4.1.2 crash resolution

  • From: "Nick Lindridge" <nick@xxxxxxxxxxxxxxxxxxxxx>
  • To: phpa@xxxxxxxxxxxxx
  • Date: Thu, 11 Apr 2002 11:55:16 +0100 (BST)

All,

I received an email from someone concerning the PHP / MySQL Driver crashes. 
It's quite possible that the MySQL driver causes memory corruption in the 
second example below, and anything in your server that causes memory 
corruption could ultimately corrupt the memory used by PHPA and cause a 
malfunction.

nick

From the email:

About the crashing, I found a workaround to the MySQL driver
segfaulting: after saying php to use a specific mysql connection,
instead of the default one, crashes disappeared. So

$conn = mysql_pconnect("host","username","pass");
mysql_select_db("db1",$conn);
$query = mysql_query("SELECT * FROM xxx",$conn)
while ($row = mysql_fetch_array($query)) do_stuff();

worked, while

$conn = mysql_pconnect("host","username","pass");
mysql_select_db("db1");
$query = mysql_query("SELECT * FROM xxx")
while ($row = mysql_fetch_array($query)) do_stuff();

randomly crashed.


------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts: