PHP Bugs  
php.net | support | documentation | report a bug | advanced search | search howto | statistics | login

go to bug id or search bugs for  

Bug #7836 memory_limit ignored
Submitted:15 Nov 2000 10:11pm UTC Modified: 18 Nov 2000 9:40am UTC
From:mail-php at kimihia dot org dot nz Assigned to:jmoore
Status:Closed Category:Documentation problem
Version:4.0.3pl1 OS:Linux 2.2.15-4mdk
View/Vote Developer Edit Submission

Welcome! If you don't have a SVN account, you can't do anything here. You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
SVN Username: SVN Password:
Quick Fix:
Status: Assign to:
Category:
Summary:
From: mail-php at kimihia dot org dot nz
New email:
Version: OS:
New/Additional Comment:

[15 Nov 2000 10:11pm UTC] mail-php at kimihia dot org dot 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
[16 Nov 2000 5:30am UTC] hholzgra@php.net
how does your configure line look like?

have you used '--enable-memory-limit' ?

it is _not_ enabled by default!
[16 Nov 2000 7:13am UTC] hholzgra@php.net
--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
[17 Nov 2000 11:21am UTC] jmoore@php.net
I find this strange that this is not enabled by default.. Is there a
good reason for this?? Personally I think its somthing people assume is
turned on and should be on by default. Maybe there are good reasons for
it not being on by default. I will add a note in php.ini and the config
options in the manual later this evening 
[18 Nov 2000 9:40am UTC] jmoore@php.net
This is actually fairly clear in the manual.. It is also clear when
doing ./configure --help. I added a note about default value to manual
but thats about all we can do.. we cant force people to read the docus

RSS feed | show source 

PHP Copyright © 2001-2009 The PHP Group
All rights reserved.
Last updated: Sat Nov 21 10:30:49 2009 UTC