PHP memory limit question

Hi all,

I’m using TYPO3 and Nextcloud (19) on same VPS, same Apache. TYPO3 community recommends to keep PHP memory limit as low as possible, afai remember because of less impact in case of DoS attacks.

Because of this I’ve added an entry only to my Nextcloud VHOST:

       <IfModule mod_php7.c>
            php_value memory_limit 512M
    </IfModule>

setting the recommended value for Nextcloud only.

Because this is VHOST-only, any call of “occ” on command line is warning about the PHP memory limit . As I’ve not that much PHP knowledge, my question is:

  • Is it possible to set PHP memory limit ONLY per occ call, e.g. pass as Parameter / temp set es bash env variable ?

Can’t find with “php occ list” or “php occ --help”

Found myself :slight_smile:

So my occ calls would be like this:

sudo -u wwwrun php -d memory_limit=512M occ --help