From: nda at acoservices dot be
Operating system: Windows XP SP2
PHP version: 5.2.5
PHP Bug Type: Apache2 related
Bug description: Using a MaxDB_query inside a while from another query crash
Apache
Description:
------------
Using a MaxDB_query inside a while from another Max_DB query makes Apache
(version 2.2.6) to crash.
PHP.INI
maxdb extention unable, dll version 5.2.5.5.
[maxdb]
maxdb.default_host=aco-portable
maxdb.default_db=IDTECH
maxdb.default_user=IDTECH
maxdb.default_pw=*****
Reproduce code:
---------------
<?php
$today=date("Y-m-d")." 00:00:00.000000";
$link=maxdb_connect() or die("Connection failed :
".maxdb_connect_error());
$query_users= "Select * from ptage_infotel where d_contrat<='$today' and
d_contrat_fin>='$today' order by name";
$result_users= maxdb_query($link,$query_users) or die("Request failed :
".maxdb_error($link));
while ($users=maxdb_fetch_array($result_users)){
echo $users[1].'<br>';
$id_user=$users[0];
if(isset($users[3])){
$query_user= "Select * from ptage_infotel where d_contrat<='$today' and
d_contrat_fin>='$today' and badge='$id_user' order by day DESC, time ASC";
$result_user= maxdb_query($link,$query_user) or die("Request failed :
".maxdb_error($link));
while ($user=maxdb_fetch_array($result_user)){
echo $users[3].'<br>';
}}}
?>
Expected result:
----------------
Print name and time for each users.
Actual result:
--------------
Apache crash with error log : "Error in my_thread_global_end(): 252
threads didn't exit"
--
Edit bug report at http://bugs.php.net/?id=44068&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=44068&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44068&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44068&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44068&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44068&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44068&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44068&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44068&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44068&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44068&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44068&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44068&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44068&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44068&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44068&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=44068&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44068&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44068&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44068&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44068&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44068&r=mysqlcfg