Изменение параметра memory_limit через файл settings.php. Пример настройки:
ini_set('max_execution_time', '30');