Internal Server Error after server move

NC20

I had my hoster move my contents to a new server because it was the only way to get mysql8 so that I could upgrade my NC.

Server move is complete. Files and databases are intact. When I try to visit NC, I just get “Internal Server Error”.
There is nothing in the error_log
nextcloud.log shows shows some memcache exceptions.

I’ve tried various PHP versions. I made sure all the required modules were enabled (PHP Modules & Configuration — Nextcloud latest Administration Manual latest documentation) and nothing helped. Everything in config looks fine. dbhost = localhost.

It worked fine before. What do I do?

I think your .htaccess file is the issue you can try

sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess

the htaccess file looks identical to before. But I ran the command anyway via cron (since I dont have shell)

/usr/local/bin/php -f stuff/public_html/cloud/occ maintenance:update:htaccess >> ${logfile} 2>&1

output:

The current PHP memory limit is below the recommended value of 512MB.
.htaccess has been updated

still no dice

I tried running occ integrity:check-core while I was at it but it found nothing.

It keeps saying this, though

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

I have no idea why it keeps complaining about memory. I have set it to 512MB in php settings.

are you using php-fpm
have you set your php memory_limit in php/N.N/cli/php.ini aswell as in php/N.N/fpm/php.ini or php/N.N/apache2/php.ini

though this should not give error 500 please show the apache webserver log too see.

You could Search error 500 outside Nextcloud and see what might cause this.

ps. the value shoud be

memory_limit = 512M

not 512MB

pps.

interesting

https://www.php.net/manual/en/ini.core.php#ini.memory-limit

https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes

I played around with PHP versions and it magically started working again.
So strange that it works with 7.4, but 7.2 (min.req.) gives server error.

You should no longer use such old PHP and Nextcloud versions, especially if your server is accessible from the Internet.

PHP 7.2 and 7.4 are EOL and no longer receive upstream security fixes. Some Linux distributions such as Debian and RHEL may still backport fixes for 7.4, but only to a limited extent, mostly for critical vulnerabilities, and 7.2 no longer receives any updates at all.

But more importantly! NC20 has been EOL for 2 years and should no longer be used! https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule

… which is why I’m trying to update it as explained in the first post. Please read the entire topic.

7.2 was the minimum for this version, therefore it should work.

Thank you for your concern, but I don’t care about vulnerabilities. It’s a personal hobby site. I’m not hosting a financial institution or nuclear weapons arsenal. I’ve been making websites for over a decade and never had a security breach (not that it would end my life), even with PHP 5. People are obsessed with security when it’s utterly unnecessary.