Announcement

  •  » Miscellaneous
  •  » error: Piwigo setting upload_form_chunk_size (500kB) should be smaller

#1 2022-07-17 06:16:52

Dingo001
Member
2022-07-08
17

error: Piwigo setting upload_form_chunk_size (500kB) should be smaller

Hello;

I moved my web site over to a new server and that included piwigo.  I am getting this error when I go to upload photos, after I click add from the menu;

Piwigo setting upload_form_chunk_size (500kB) should be smaller than PHP configuration setting upload_max_filesize (1kB)

I have had a look in /etc/php/7.4/apache2/php.ini  and upload_max_filesize = 20M and post_max_size = 8M.

I searched the piwigo for the text upload_form_chunk_size with

f

Code:

 find -type f -exec grep -IH 'upload_form_chunk_size' {} \;

with this result

./admin/include/photos_add_direct_prepare.inc.php:      'chunk_size' => $conf['upload_form_chunk_size'],
./admin/include/photos_add_direct_prepare.inc.php:  if (get_ini_size('upload_max_filesize') < $conf['upload_form_chunk_size']*1024)
./admin/include/photos_add_direct_prepare.inc.php:      'Piwigo setting upload_form_chunk_size (%ukB) should be smaller than PHP configuration setting upload_max_filesize (%ukB)',
./admin/include/photos_add_direct_prepare.inc.php:      $conf['upload_form_chunk_size'],
./include/ws_functions/pwg.php:    $res['upload_form_chunk_size'] = $conf['upload_form_chunk_size'];
./include/config_default.inc.php:$conf['upload_form_chunk_size'] = 500;

I had a look inside /include/config_default.inc.php and this is what is there.  it is set to 500kb

// Size of chunks, in kilobytes. Fast connections will have better
// performances with high values, such as 5000.
$conf['upload_form_chunk_size'] = 500;

Any help would be appreciated as I cannot upload photos to piwigo.  It goes through the process of uploading and just stops when all the files are uploaded.  When you exit the photos are not in piwigo.

Piwigo 12.2.0 Check for upgrade
Operating system: Linux
PHP: 7.4.3 (Show info) [2022-07-17 00:09:48]
MySQL: 8.0.29-0ubuntu0.20.04.3 [2022-07-17 00:09:48]
Graphics Library: External ImageMagick 6.9.10-23
Cache size 1336.14 MB   calculated right now Refresh
Activated plugin list4
Admin Tools
Language Switch
LocalFiles Editor
Take A Tour of Your Piwigo



Piwigo URL: http://dingo-den.com

Last edited by Dingo001 (2022-07-17 06:22:09)

Offline

 

#2 2022-07-17 06:45:43

Dingo001
Member
2022-07-08
17

Re: error: Piwigo setting upload_form_chunk_size (500kB) should be smaller

I don't know how this fixed the problem but I saw in the text of upload_form_chunk_size the comment

/ Size of chunks, in kilobytes. Fast connections will have better
// performances with high values, such as 5000.

I changed the upload_form_chunk_size to 5000 and now the upload works fine.

Maybe it was not reading things correctly ?????

Offline

 

#3 2022-07-17 12:12:35

erAck
Only trying to help
2015-09-06
1500

Re: error: Piwigo setting upload_form_chunk_size (500kB) should be smaller

Dingo001 wrote:

I have had a look in /etc/php/7.4/apache2/php.ini  and upload_max_filesize = 20M and post_max_size = 8M.

Maybe not related, but that doesn't make much sense because it means one file can have 20MB but all files together in one upload can have only 8MB. And if there wasn't the other message it should raise a warning with
In your php.ini file, the upload_max_filesize (%sB) is bigger than post_max_size (%sB), you should change this setting
from admin/include/photos_add_direct_prepare.inc.php

I think after you changed upload_form_chunk_size to 5000 it working was coincidence and something else changed as well.


Btw,

Code:

 find -type f -exec grep -IH 'upload_form_chunk_size' {} \;

note that grep itself can search files recursively with the -r option, you don't need find for that, and in that case -H is unnecessary if there's more than one file to match, so

Code:

grep -rI 'upload_form_chunk_size' .

would do.


Running Piwigo at https://erack.net/gallery/

Offline

 

#4 2022-07-17 12:30:09

Dingo001
Member
2022-07-08
17

Re: error: Piwigo setting upload_form_chunk_size (500kB) should be smaller

Hi erAck,

I am not a programmer I just copied the command off the web,  but I have saved your version for future use, thank you.

I had a look in the php.ini file and I have  post_max_size = 100m and upload_max_filesize = 20M
so I wrote it down wrong.  I blame old timers :)

Thanks for the reply.

Giles

Offline

 
  •  » Miscellaneous
  •  » error: Piwigo setting upload_form_chunk_size (500kB) should be smaller

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact