ID: 28131 User updated by: webmaster at macway dot com Reported By: webmaster at macway dot com Status: Bogus Bug Type: Reproducible crash Operating System: Windows XP PHP Version: 4.3.6 New Comment:
> wez Ok perharps its works with str_repeat, but it doesn't seem to work with array. Please check with my code. Maybe I badly worded it,; maybe it's just with arrays, check with my lateest code please Previous Comments: ------------------------------------------------------------------------ [2004-04-26 17:53:33] webmaster at macway dot com As I just said, I retested it with PHP 4.3.6 ALONE (without any webserver) using the php.exe under windows XP. So it's clearly a problem with PHP 4.3.6 itself ------------------------------------------------------------------------ [2004-04-26 17:32:16] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. My 512MB laptop running XP will allocate 800MB (probably as much as the page file size, if I pushed it). C:\php4>php -r "$x = str_repeat('*', 128 * 1024 * 1024); echo 'Done';" Done C:\php4>php -r "$x = str_repeat('*', 400 * 1024 * 1024); echo 'Done';" Done C:\php4>php -r "$x = str_repeat('*', 600 * 1024 * 1024); echo 'Done';" Done C:\php4>php -r "$x = str_repeat('*', 800 * 1024 * 1024); echo 'Done';" Done C:\php4>php -r "$x = str_repeat('*', 1280 * 1024 * 1024); echo 'Done';" FATAL: emalloc(): Unable to allocate 1342177281 bytes It works fine; no crashes. You must have something wrong with your configuration; check your memory_limit and error_reporting settings and talk to someone on a support channel to discover the reason that you have problems with this. ------------------------------------------------------------------------ [2004-04-26 16:58:08] webmaster at macway dot com Faster code exhibiting the problem : <?php for ($i = 1; $i <= 1024; $i++) // I'm just making a 1024 Byte string { $chunk .='a'; } for ($i = 1; $i <= 66000; $i++) // if you use 65000 it works { $tablo[]=$chunk; } echo "c'est fini"; ?> ------------------------------------------------------------------------ [2004-04-26 16:55:59] webmaster at macway dot com THE PROBLEM IS VERY SERIOUS : it crashes the php engine on Windows XP. It is reproductible. I've redonne some tests and it appears that the web server is nit the issue (launching the php.exe without any webserver exhibits the problem). I've you have 4 different variables, then the max size of each will be 64/4 = 16MB of ram max. That means the total ram consumed by the script has to be lower than 64MB ------------------------------------------------------------------------ [2004-04-26 12:02:02] [EMAIL PROTECTED] We don't support third party PHP distributions. Please give the feedback we requested. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/28131 -- Edit this bug report at http://bugs.php.net/?id=28131&edit=1