The PHP memory limit is below the recommended value of 512MB. 1020

I keep getting the above error even though the settings are correct

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

[/details]

Nextcloud version (eg, 20.0.5): replace me
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): N
Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

{“reqId”:“VTigPOWp9Q8AKb4J3MYj”,“level”:2,“time”:“2022-01-22T18:05:20+00:00”,“remoteAddr”:“2.57.169.196”,“user”:"–",“app”:“core”,“method”:“PROPFIND”,“url”:"/remote.php/webdav/",“message”:“Login failed: ‘Manuel’ (Remote IP: ‘2.57.169.196’)”,“userAgent”:“Mozilla/5.0 (Linux) mirall/2.6.2-1build1 (Nextcloud)”,“version”:“23.0.0.10”,“id”:“61ec54800ccba”}

{"reqId":"hLwbXxCV8BnGQ5rIkJLG","level":3,"time":"2022-01-21T22:58:06+00:00","remoteAddr":"17.121.113.56","user":"--","app":"PHP","method":"GET","url":"/category/sports-entertainment/18","message":"unlink(/media/nextcloud_data/data/appdata_ocl1l00v5odc/css/core/8f4e-fe46-css-variables.css.gzip): No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#291","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15 (Applebot/0.1; +http://www.apple.com/go/applebot)","version":"23.0.0.10","exception":{"Exception":"Error","Message":"unlink(/media/nextcloud_data/data/appdata_ocl1l00v5odc/css/core/8f4e-fe46-css-variables.css.gzip): No such file or directory at /var/www/html/nextcloud/lib/private/Files/Storage/Local.php#291","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/Files/Storage/Local.php","line":291,"function":"unlink"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":1171,"function":"unlink","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":728,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/File.php","line":131,"function":"unlink","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/SimpleFS/SimpleFile.php","line":149,"function":"delete","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/SCSSCacher.php","line":397,"function":"delete","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/SCSSCacher.php","line":289,"function":"resetCache","class":"OC\\Template\\SCSSCacher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/SCSSCacher.php","line":153,"function":"variablesChanged","class":"OC\\Template\\SCSSCacher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/CSSResourceLocator.php","line":110,"function":"process","class":"OC\\Template\\SCSSCacher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/CSSResourceLocator.php","line":62,"function":"cacheAndAppendScssIfExist","class":"OC\\Template\\CSSResourceLocator","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/ResourceLocator.php","line":78,"function":"doFind","class":"OC\\Template\\CSSResourceLocator","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/TemplateLayout.php","line":353,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/TemplateLayout.php","line":261,"function":"findStylesheetFiles","class":"OC\\TemplateLayout","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php","line":182,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":297,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":949,"function":"checkMaintenanceMode","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"61ec54800cea9"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocl1l00v5odc',
  'passwordsalt' => 'hXtJelHrY2UKC+0xRETE6oguPks/3J',
  'secret' => 'cxHgbzaerelcInJ5c+mVM0LOllru/8RJSspnwRAPdf84NfzE',
  'trusted_domains' => 
  array (
    0 => 'electricman.me',
  ),
  'datadirectory' => '/media/nextcloud_data/data/',
  'dbtype' => 'mysql',
  'version' => '23.0.0.10',
  'overwrite.cli.url' => 'https://xxxxxxxxxxx',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'pi',
  'dbpassword' => 'xxxxxxxxxx',
  'installed' => true,
  'mail_from_address' => 'xxxxxxxxxxx',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'hotmail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'maintenance' => false,

The output of your Apache/nginx/system log in /var/log/____:

le or directory in /var/www/html/nextcloud/status.php on line 35PHP message: PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/nextcloud/lib/versioncheck.php' (include_path='.:/usr/share/php') in /var/www/html/nextcloud/status.php:35\nStack trace:\n#0 {main}\n  thrown in /var/www/html/nextcloud/status.php on line 35'
[Mon Jan 17 18:45:46.659502 2022] [core:error] [pid 6919] [client 45.146.165.37:47350] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Mon Jan 17 21:31:32.807739 2022] [proxy_fcgi:error] [pid 9814] [client 217.180.233.72:54518] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 237450688 bytes) in /var/www/html/nextcloud/lib/private/Installer.php on line 300'
[Mon Jan 17 22:40:11.024579 2022] [proxy_fcgi:error] [pid 2742] [client 164.132.44.97:51678] AH01071: Got error 'Primary script unknown', referer: electricman.me
[Tue Jan 18 11:54:48.771184 2022] [proxy_fcgi:error] [pid 3048] [client 72.167.69.40:56704] AH01071: Got error 'Primary script unknown', referer: http://electricman.me/wp-login.php
[Tue Jan 18 14:56:13.619847 2022] [core:error] [pid 6072] [client 45.146.165.37:58486] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Tue Jan 18 15:00:46.735056 2022] [negotiation:error] [pid 6073] [client 174.138.6.169:41385] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/remote (None could be negotiated).
[Tue Jan 18 15:41:26.091534 2022] [negotiation:error] [pid 6072] [client 54.176.45.193:59364] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/remote (None could be negotiated).
[Tue Jan 18 20:54:28.856217 2022] [negotiation:error] [pid 6072] [client 45.146.165.37:54164] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/console (None could be negotiated)., referer: http://217.180.233.72:80/console/
[Wed Jan 19 05:11:11.471803 2022] [negotiation:error] [pid 10414] [client 45.146.165.37:32996] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/console (None could be negotiated).
[Wed Jan 19 09:48:59.382015 2022] [core:error] [pid 11100] [client 45.146.165.37:57348] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Wed Jan 19 13:04:54.634337 2022] [autoindex:error] [pid 3064] [client 45.130.83.89:9413] AH01276: Cannot serve directory /var/www/html/nextcloud/apps/files/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
[Wed Jan 19 14:25:42.519884 2022] [proxy_fcgi:error] [pid 3137] [client 139.59.97.219:50180] AH01071: Got error 'Primary script unknown'
[Wed Jan 19 14:25:44.155891 2022] [proxy_fcgi:error] [pid 3067] [client 139.59.97.219:50988] AH01071: Got error 'Primary script unknown'
[Wed Jan 19 14:35:32.239451 2022] [negotiation:error] [pid 3067] [client 75.148.99.253:49575] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/remote (None could be negotiated).
[Wed Jan 19 15:48:18.832685 2022] [proxy_fcgi:error] [pid 3065] [client 201.149.55.226:37407] AH01071: Got error 'Primary script unknown', referer: electricman.me
[Wed Jan 19 15:48:23.646500 2022] [proxy_fcgi:error] [pid 3067] [client 201.149.55.226:37973] AH01071: Got error 'Primary script unknown', referer: electricman.me
[Wed Jan 19 17:40:40.671148 2022] [negotiation:error] [pid 3143] [client 45.146.165.37:58598] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/console (None could be negotiated)., referer: http://217.180.233.72:80/console/
[Thu Jan 20 01:34:03.459461 2022] [negotiation:error] [pid 7653] [client 45.146.165.37:41846] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/console (None could be negotiated).
[Thu Jan 20 05:39:45.131044 2022] [core:error] [pid 7654] [client 45.146.165.37:34480] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Thu Jan 20 11:16:15.808260 2022] [proxy_fcgi:error] [pid 7653] [client 39.106.105.38:40036] AH01071: Got error 'Primary script unknown', referer: http://electricman.me/wp-login.php
[Fri Jan 21 18:40:38.179654 2022] [negotiation:error] [pid 2059] [client 45.146.165.37:35664] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/console (None could be negotiated).
[Fri Jan 21 21:48:48.240295 2022] [core:error] [pid 2055] [client 128.14.134.170:36172] AH10244: invalid URI path (/icons/.%2e/%2e%2e/apache2/icons/sphere1.png)
[Fri Jan 21 21:48:48.551096 2022] [core:error] [pid 2056] [client 128.14.134.170:36754] AH10244: invalid URI path (/icons/.%%32%65/.%%32%65/apache2/icons/sphere1.png)
[Fri Jan 21 21:48:48.861760 2022] [core:error] [pid 2428] [client 128.14.134.170:37432] AH10244: invalid URI path (/icons/.%%32%65/.%%32%65/apache2/icons/non-existant-image.png)
[Fri Jan 21 22:52:48.338414 2022] [core:error] [pid 2057] [client 45.146.165.37:57694] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Sat Jan 22 06:48:17.484582 2022] [negotiation:error] [pid 6403] [client 45.146.165.37:57180] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/nextcloud/console (None could be negotiated)., referer: http://217.180.233.72:80/console/

Please always use the search function of the forum first :wink: :

https://help.nextcloud.com/search?q=The%20PHP%20memory%20limit%20is%20below%20the%20recommended%20value%20of%20512MB

1 Like