You need to ensure PHP has enough memory available. You can control this by setting the memory_limit setting in php.ini. I find 64M to be enough in most cases.
See http://ez.no/developer/forum/install_configuration/fatal_error_maximum_execution_time_of_30_seconds/re_fatal_error_maximum_execution_time_of_30_s__7