HELP PHP memory limit is below the recommended value of 512MB

Hello,

Following a message “The PHP memory limit is below the recommended value of 512MB.”
I modified php.init files, following the modification my server was no longer accessible. Apache was in error.
So I reinstalled apache2, and the server is started again but I access the file index.php in text format. I guess a permissions problem.

Can you help me? thank you in advance

Nextcloud version : 18
Operating system and version : debian 10
Apache version : 2.4.38
PHP version : 7.3

Put a line into your apache vhost file like:

php_admin_value memory_limit 512M

You find that file in /etc/apache2/sites-available/
Put the line inside the
<Directory... >
...
</Directory>
segment.

As for the display of the source text index.php, did you enable the php module again after reinstalling apache?

sudo a2enmod php7.3

and restart apache

Sounds like a typo error while modifing the php.ini files. Can u post your changes here?

Sounds indeed like a typo. On my Debian 10-system with Apache2 and PHP 7.3 the php.ini is located in /etc/php/7.3/apache2.

The tag is

; Maximum amount of memory a script may consume (128MB)

; http://php.net/memory-limit

memory_limit = 512M

and once you type it that way, it should work.

Best regards,

Oliver

Thank you, actually I had not reactivated the php module.

Thanks olliware, I no longer have the error “The PHP memory limit is lower than the recommended value of 512 MB.”

1 Like