The Zend Fat MM patches have been updated to support setting an environment variable, ZEND_FATMM, to control the size of the pre-allocated memory size. The memory size setting can now also be set to 0 to effectively disable the Fat Memory Manager. I also wanted to be able to control these settings from the Apache configuration directive SetEnv in the env module. This, however, won’t work under PHP in it’s current form as SetEnv doesn’t actually set the system environment variables. To work around this I’ve also created a new directive, SetSysEnv, which enables users to control actual environment variables from within Apache configurations. This is useful for setting things like ZEND_FATMM, as well as the other environment variables in the Zend memory manager. Enjoy and drop me some feedback.
3 Responses for "Apache SetSysEnv and New Zend Fat MM updates"
Hi Brian,
Wouldn’t it make more sense to control this via the normal INI-type config? In apache you could even php_value or php_admin_value …
I must be missing something (-:
S
Hey Sean,
Yeah, normally it’s preferred that I just add an INI option for these configurations, however these are low level options within the Zend memory manager so at this point in the startup process we don’t yet have access to any of the PHP INI configuration options, we can’t even allocate memory yet. :-( Other options would probably be too complicated at this point, like re-initializing the zend core twice etc so it’s just easier to set environment variables to control these options as they have to be known before we can even startup Zend.
-shire
Aha. That makes a lot of sense. I knew I must have been missing something obvious to you (-:
Thanks for clarifying.
S
Leave a reply