PHP 4.0 Bug #4869: memory corruption
| From: | websupport at silyn-tek dot de | Date: | Wed, 07 Jun 2000 14:19:00 +0000 |
| Subject: | PHP 4.0 Bug #4869: memory corruption | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-20470@lists.php.net to get a copy of this message | ||
From: websupport@silyn-tek.de
Operating system: linux 2.2
PHP version: 4.0.0 Release
PHP Bug Type: MSSQL related
Bug description: memory corruption
I supply a codefragment, please email me for further infos.
The problem occurs with final and RC1 version (others untested).
There seems to be memory corruption when i do mssql_query() or mssql_fetch_array($r)
The result_array ist correct inside my function, but the returned array contains trash.
When i put less code into fetch_cid() the error occury not everytime.
i use sybase-11.9.2 PHP-4.0.0 Apache/1.3.12 linux 2.2.14
function print_array($a)
{while (list ($key, $val) = each ($a)) {echo "$key\t$val\n";};};
function fetch_cid($cid)
# three mssql_query and one preg_match
# $res[...]=...
print_array($res);
return $res;# ?????
};
$u=fetch_cid(35800);
print_array($u);
OUTPUT:
FIRSTNAME german
LASTNAME deutsch
COMPANY
COMMENTS 0.51331600 959688455
VAT 1
MAIDENNAME geheim
EMAIL email
TARIF Surf Basic
FIRSTNAME Ü
LASTNAME Ô»
COMPANY
COMMENTS COMPANY
VAT 1
MAIDENNAME geheim
EMAIL email
TARIF TARIF