#23534 [Opn]: while and for loops getting stuck when counter check exceeds 13

From: Date: Thu, 08 May 2003 04:41:11 +0000
Subject: #23534 [Opn]: while and for loops getting stuck when counter check exceeds 13
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39271@lists.php.net to get a copy of this message
ID: 23534 User updated by: mark at onelauter dot com Reported By: mark at onelauter dot com Status: Open Bug Type: Scripting Engine problem Operating System: Windows 2000 Server PHP Version: 4.3.1 New Comment: I should mention that these scripts are currently running fine on an older windows 2000 server. Since I want to retire this box I basically copied the existing installation to the new machine and adjusted NTFS permissions, set up IIS to use the ISAPI version and everything worked fine (as far as i can tell) except for this looping issue. Previous Comments: ------------------------------------------------------------------------ [2003-05-07 23:37:10] mark at onelauter dot com Thank you for the fast reply, I tried the snapshot located here: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip I still have the same problem. I tried an older version too (4.2.x) and it also couldn't count higher than 13. I could prearrange to have this server open live to the internet for a short period so that someone could check my test script with php info if that would help. ------------------------------------------------------------------------ [2003-05-07 16:29:24] moriyoshi@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-05-07 16:23:34] mark at onelauter dot com This works. for ($i=0; $i < 13; $i++) { echo "$i "; } This gets stuck in an infinate loop. for ($i=0; $i < 14; $i++) { echo "$i "; } Any value of 14 or greater results in the same problem. It also occurs with while loops. This works. $i = 0; while ($i < 13) { echo "$i "; $i++; } This gets stuck in an infinate loop. $i = 0; while ($i < 14) { echo "$i "; $i++; } The same problem will occur if I do this. $i = 0; while ($i < 13) { echo "$i "; $i++; } for ($i=0; $i < 13; $i++) { echo "$i "; } Even though the loops would work indepedently, they won't work in the same php file. I'm running as an ISAPI process with IIS 5 (inetinfo.exe version # 5.0.2195.3649). If I run the same test script on the command line with php.exe I don't have a problem. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23534&edit=1

« previous php.bugs (#39271) next »