php.ini / .htaccess memory issues
i have a program that runs once when my website loads (randomphoto block in a nuked gallery 1.43a). it requires more than the standard 8 mb memory set in /etc/php.ini. (e.g. memory_limit 32M). Since php.ini governs any php script, i am concerned that just increasing the limit for the entire server could cause stability problems. I need to know if there are alternatives for setting the memory limit, especially in a .htaccess file.
Iwould like to allow this increased memery consumption for this one program or one website.
I have seen suggestions that the memory limit can be set as part of the virtual host configuration:
php_admin_value memory_limit 20M
I have heard that php parameters can be set in .htaccess files but have not seen an example of this for memory.
logged error message
[client 192.168.0.44] PHP Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 32 bytes) in /var/www/html/modules/gallery/classes/Album.php on line 783
|