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