Hey my friends!
Nextcloud version: 21
Operating on Raspberry 4
PHP version: 7.3.1
The issue I am are facing:
If I want to upload a file with ~ 5GB, this error occurs:
<<Error while copying file to target location (copied bytes: -1, expected filesize: -1 )>>
I thought this issue could be solved by adjusting the settings in php.ini (like mentioned here Uploading big files > 512MB — Nextcloud latest Administration Manual latest documentation):
But it doesn’t.
What am I overlooking?
P.S.: Please be merciful with me. I am new to NC
Hello mate, hope you are doing well…
Are you using FAT32 as filesystem?
Keep in mind that fat32 only recognizes a partition that’s maximum 4GB.
I see that you are running on a rspb, so check that first.
Thanks for your answer.
I knew about that restriction and therefore use ext4 on the hard drive.
Any other clue, what could cause the error?
Hmmm, the php file that you edited is the: /etc/php.ini or another one?
Sometimes you have multiple files with that name and that can confuse things up.
I suggest you to run: find / -iname php.ini
That way, you will search your entire disk for that (or those) file(s).
If you see more than one file with that same name, try editing it too.
Good luck mate, all the best.
beside /etc/php/7.3/apache2/php.ini I also changed /etc/php/7.3/cli/php.ini.
But for the web server with apache2 the first path is the right one, isnt it?
Anyways, unfortunately it produces the same error with both changed.
Are you running php-fpm? Then it would be this one:
Doesn’t seem so, because the directory /etc/php/7.3/fpm does not exist
Did you add the entries to the files or modify the existing entries? Make sure that the entries are only present once per php.ini file.
Also check the .htaccess and .user.ini files in your Nextcloud installation folder. If they contain upload_max_filesize or post_max_size entries, delete them or set the same values as in the php.ini files.
Other than that, I can’t think of anything from the top of my head. If none of the above works, the error has most likely another origin. Maybe some problem in interaction with the external storage or mounted drive. Some caching/timeout problem. I’m not sure…
The Nextcloud docs also mention disabling the reqtimeout module. Uploading big files > 512MB — Nextcloud latest Administration Manual latest documentation
Did you try disabling it?
sudo a2dismod reqtimeout