Php is setup is to limit memory usage per process. If you require more, this limit can be increased. Edit
/usr/local/lib/php.ini
and set:
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
to a higher value, like 20M. Save, exit, then restart apache.