From: joe at estara dot com Operating system: linux 2.6.16 PHP version: 5.1.4 PHP Bug Type: Reproducible crash Bug description: --enable-memory-limit doesn't work
Description: ------------ Using php 5.1.4, --enable-memory-limit appears to have no effect. e.g. php -i: shows I have it set: memory_limit => 1M => 1M Configure shows it's in there Configure Command => './configure' ... '--enable-memory-limit' Here's the whole thing: Configure Command => './configure' '--prefix=/prod/apache/php' '--with-apxs2=/p rod/apache/bin/apxs' '--with-openssl' '--with-mysql=/prod/mysql' '--with-zlib' ' --without-pear' '--with-gd' '--with-ttf' '--enable-gd-native-ttf' '--with-freety pe-dir=/usr' '--with-mcrypt' '--with-imagick=shared' '--with-pfpro=shared,/prod/ pfpro/' '--enable-sockets' '--with-curl' '--enable-mbstring=all' '--without-sqli te' '--without-pdo-sqlite' '--with-jpeg-dir=/usr/' '--with-png-dir=/usr/' '--wit h-libdir=lib64' '--enable-memory-limit' '--enable-sysvshm' Reproduce code: --------------- <?php for($i=0;$i<400; $i++) ${'test' . $i} = file_get_contents("/etc/termcap"); ?> Expected result: ---------------- I'd expect it to hit my 1M limit and error out. Actual result: -------------- It uses all available ram on the machine and dies. -- Edit bug report at http://bugs.php.net/?id=37831&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37831&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37831&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37831&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37831&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37831&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37831&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37831&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37831&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37831&r=support Expected behavior: http://bugs.php.net/fix.php?id=37831&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37831&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37831&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37831&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37831&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37831&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37831&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37831&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37831&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37831&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37831&r=mysqlcfg