Chunks on server do not sum up


Hi all,

I'm facing an issue with uploading files. I have one that is about 2.3GB that fails.
My platform is a raspberry pi zero with raspbian jessie.
I run owncloud 10.0.3.
Apache is v 2.4.10
Php is PHP 5.6.30-0+deb8u1
Mysql is v 5.5

I have enabled in the .htaccess the following params:
php_value upload_max_filesize 4096M
php_value post_max_size 4096
and in the .user.ini
After restarting apache2, from the web client and from the linux client I get the same error: "Chunks on server do not sum up to but to "
This size is the same, and it is about the size of the file.

Do you have suggestions?


Error Upload an /data/username/upload/ directory

I did the following search and found


This issue comes with owncloud 10.0.3 and is only seen on 32bit operating systems with uploads > 2GB.
There is possible fix for it:


--- ChunkingPlugin.php 2017-11-29 12:21:24.908670200 +0100
+++ ChunkingPlugin_fixed.php 2017-11-29 12:12:41.650468900 +0100
@@ -99,7 +99,7 @@
$actualSize = $this->sourceNode->getSize();
- if ((int)$expectedSize !== $actualSize) {
+ if ($expectedSize !== (string)$actualSize) {
throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize");


I can confirm that andre's solution fixes the problem. So to rehearse; in the file

you change the line that says
if ((int)$expectedSize !== $actualSize) {
if ($expectedSize !== (string)$actualSize) {


There's an issue ticket here about this