PHP limits the amount of memory available for execution of a script. This is controled by memory_limit configuration option.

By default, memory_limit is set to 8MB. If the script tries to allocate more memory, PHP will display a fatal error that looks something like this:

Fatal error: Allowed memory size of N bytes exhausted (tried to allocate M bytes) in FILE on line #.

To get around this error, you will need to increase the PHP memory limit and make more room for executing the application.

To do that open php.ini file, find a line where memory_limit option is defined and change it to a higher value. Although 8MB is enough for most activeCollab requests, in some cases activeCollab will need more memory, especially when working with images. Because of that, we recommend memory limit to be set to 64MB.

The line where memory limit is defined will look like this:

memory_limit = 64M

Once you have made the change, save the php.ini file and restart your web server.

Note

On some servers you will not be able to change php.ini file by yourself. In that case, please contact your system administrator or hosting provider in order to make this change for you.

1. Problems with Memory and Image Thumbnail Creation

Thumbnail creation for images was introduced in activeCollab 1.1. It is enabled by default. It automatically resizes images (JPG, GIF and PNG) smaller than 1MB and enables users to see a preview without downloading the original file. This caused problems on some setups where the recommended 64MB memory limit was not high enough for the resize operation to be performed.

The fix for this issue was introduced in activeCollab 1.1.1. From this release you can set the max size of images that will be resized (default is 500kb) or completely turn off thumbnail creation.

Now, in config/config.php you can define two new configuration options:

  1. CREATE_THUMBNAILS - True or False, enables or disables thumbnail creation. True by default.
  2. RESIZE_SMALLER_THAN - If CREATE_THUMBNAILS is set to true this option defines the maximum size in bytes of images that can be resized. Default is 524288 (500kb). Larger images will be ignored. Here is how it should look like in your config/config.php if you wanted to have thumbnails enabled for all images smaller than 1MB: Here is how it would look like in your config/config.php if you wanted to have thumbnails enabled for all images smaller than 1MB:
define('CREATE_THUMBNAILS', true);
define('RESIZE_SMALLER_THAN', 1048576);