tags:

views:

46

answers:

2

Hi guys i have this in my htaccess file, i was wondering what is it for ? what happens if i increase it to say 128mb or 16mb what difference would it make

+3  A: 

It means that your script will use up to that amount of RAM before the server just aborts it and you get a memory error ("script tried to allocate 81 bytes that exceeded the limit - exploding")

webdestroya
but this wont make my site load any faster?
DAVID
No, it wont make it load any faster. (Since it is just a maximum limit)
webdestroya
@DAVID: No, it really won't. It will just allow bad scripts to continue running and eating up your resources longer before they get killed.
animuson
@animuson - exactly. You generally should not need to increase it (unless it is set really low), but at 128MB, that should be more than enough for any legitimate application
webdestroya
A: 

some applications require more memory than the regular php limit. (16mb I think) Programs like Drupal recommend increasing it, and I have seen some large web applications run it with 100mb. Keep in mind this is not necessarily the best way to deal with a heavy program, instead looking at where your mem usage is with memory_get_usage in various places to better understand the heavy usage. Also consider that you may want to control it from php.ini and set it universally for all php instances, as opposed to maintaining on a per directory basis.

fafnirbcrow