PHP 4.0 Bug #7836 Updated: memory_limit ignored

From: Date: Thu, 16 Nov 2000 12:13:59 +0000
Subject: PHP 4.0 Bug #7836 Updated: memory_limit ignored
Groups: php.dev 
Request: Send a blank email to php-dev+get-38331@lists.php.net to get a copy of this message
ID: 7836 Updated by: hholzgra Reported By: mail-php@kimihia.org.nz Status: Open Bug Type: Documentation problem Assigned To: Comments: --with-memory-limit was not enabled maybe this is not clear enough in the manual or the comments in php.ini-dist ? moved to documentation problems Previous Comments: --------------------------------------------------------------------------- [2000-11-16 05:30:00] hholzgra@php.net how does your configure line look like? have you used '--enable-memory-limit' ? it is _not_ enabled by default! --------------------------------------------------------------------------- [2000-11-15 22:11:20] mail-php@kimihia.org.nz The resource limits section of php.ini is being ignored. The ini file reads: memory_limit = 6M In a script it is possible to allocate well past this. I succeeded in allocating over 100MB. Sample: $str = ''; $total = 0; for ( $i = 0 ; $i < 65000 ; $i++ ) $str .= 'a'; for ( $i = 0 ; $i < 1024 ; $i++ ) { printf(' %d (%d)', $i, $total); $strbuff[$i] = "$i - $str"; flush(); $total += strlen($strbuff[$i]); } # This allocates ~ 64MB --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7836

« previous php.dev (#38331) next »