A common question has been asked many many times both in the tiki forums and also on our IRC channel. The question is: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 737280 bytes) in xxxxx or sometimes, I keep getting blank or half drawn pages, whats the problem?
The answer is that PHP is running out of memory! Click read more for some solutions to the problem.
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 737280 bytes) in xxxxx or I keep getting blank or half drawn pages, whats the problem? are very common questions asked in the various support channels TikiWiki provides. The answer is quite simply a default PHP installation is configured to give PHP 8Mb's of memory. This is ample for more tasks, but TikiWiki needs more.
There are a number of solutions to this problem;
- Install turck-mmcache.
Turck MMCache is a free open source PHP accelerator, optimizer, encoder and dynamic content cache for PHP. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. Also it uses some optimizations to speed up execution of PHP scripts. Turck MMCache typically reduces server load and increases the speed of your PHP code by 1-10 times.
We also recommend that you follow the next step as well, as uploading images and files will require more memory.
- Edit your php.ini:
most linuxes: /etc/php.ini
and find the memory_limit variable.
;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
Change the 8M to 16M or even better 32M.
memory_limit = 32M ; Maximum amount of memory a script may consume (8MB)
The more features, content and connected users the larger the better.
Remember to restart your Apache or IIS after change the INI file