#18743 [NEW]: Pushing values to an array dies with large number of elements
| From: | mgrommet at yahoo dot com | Date: | Mon, 05 Aug 2002 17:59:04 +0000 |
| Subject: | #18743 [NEW]: Pushing values to an array dies with large number of elements | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-16015@lists.php.net to get a copy of this message | ||
From: mgrommet@yahoo.com
Operating system: Linux Redhat 7.2
PHP version: 4.2.2
PHP Bug Type: Reproducible crash
Bug description: Pushing values to an array dies with large number of elements
I have an object with a method that performs a mysql search.
It collects values from the search results, and pushes them on to an array
to return.
This code works great for smaller query results, but it causes a
segmentation fault with larger numbers (approximately 1300 results)
Running PHP 4.2.2
Apache 1.3.6 (mod_frontpage, mod_rewrite)
MySQL 3.23.43
--- EXAMPLE CODE ---
$mailDbLink = mysql_connect($mailserver,$mailuser,$mailpass) or
die("Could not connect to mail system");
mysql_select_db($maildbname) or die("Could not select appropriate
database in 98-11 system");
$query = mysql_query($processEmailTableSql) or die("Could not perform
98-11 search: " . mysql_error());
while($row = mysql_fetch_array($query))
{
array_push($resultsArray,$row["MessageID"]);
}
return $resultsArray;
--
Edit bug report at http://bugs.php.net/?id=18743&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18743&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18743&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18743&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18743&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18743&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18743&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18743&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18743&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18743&r=globals