Bug #16322 Updated: Page stops loading when processing arrays in foreach cycles inside functions

From: Date: Fri, 19 Jul 2002 05:00:11 +0000
Subject: Bug #16322 Updated: Page stops loading when processing arrays in foreach cycles inside functions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14587@lists.php.net to get a copy of this message
ID: 16322 Updated by: php-bugs@lists.php.net Reported By: lsro@mega.ist.utl.pt -Status: Feedback +Status: No Feedback Bug Type: Arrays related Operating System: Windows XP PHP Version: 4.1.2 New Comment: No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2002-06-18 04:34:11] derick@php.net Please provide a short, ready-to-run (ie. no external dependencies) so that we can try to reproduce it. Derick ------------------------------------------------------------------------ [2002-03-27 16:52:26] lsro@mega.ist.utl.pt First of all, I'm running PHP 4.1.2 as a script with Apache 1.3 on Windows XP Pro. I'm only using gd2 and gettext as modules. To illustrate what is happening to me right now, suppose I got an array $authors from a database, each containing another array with two key-value pairs (aid, author.) Now, in order to print it out, I use: function listArticleAuthors() { global $authors; if ($authors) foreach($authors as $a) echo "<li><a href='author.php?id=" . $a[aid] . "'>" . $a[name] . "</a></li>"; return; } I have three or four other functions somewhat similar to this one, which iterate through other arrays. The arrays are all very small (no more than half a dozen elements each.) Now, there's no problem when I run the code below *outside* the function. There is also no problem when I'm calling only a couple of these functions. But when I call all the functions, or the same function more than once, the PHP process inexplicably goes zombie and the page stops loading. It's only when I kill the process using Task Manager that the page resumes loading as normal. There's no lost output, there is no system slowdown. I don't think I'm pushing it too hard: the PHP process just stays running using very little resources (0% processor, 2 or 3 megs.) Any idea about what could be happening? Cheers and thanks! L. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16322&edit=1

« previous php.bugs (#14587) next »