forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 upload => Topic started by: lazlo on January 23, 2019, 04:50:10 pm

Title: Upload problem
Post by: lazlo on January 23, 2019, 04:50:10 pm
Just upgraded to 1.6x on 1&1 (Ionos now) since they require PHP 7.2  and everything seems to be working with the exception of uploading pictures. I always get a message: "File is larger than max size allowed." even though I set the sizes to default recommended. Even if I try to upload a 10kb file I get the same message. Would you mind giving me some ideas how to fix this ?
Title: Re: Upload problem
Post by: lazlo on January 23, 2019, 06:44:13 pm
Just upgraded to 1.6x on 1&1 (Ionos now) since they require PHP 7.2  and everything seems to be working with the exception of uploading pictures. I always get a message: "File is larger than max size allowed." even though I set the sizes to default recommended. Even if I try to upload a 10kb file I get the same message. Would you mind giving me some ideas how to fix this ?

I realize that when I choose single file upload I can upload one picture at a time. Still no luck with HTML5 or Flash
Title: Re: Upload problem
Post by: phill104 on January 23, 2019, 08:42:01 pm
While this section of the docs needs updating, most of it is still pertinent - http://documentation.coppermine-gallery.net/en/upload_troubleshooting.htm

If you could do as suggested in that section, providing a link and a test account etc, then it will make diagnoses a lot easier.
Title: Re: Upload problem
Post by: lazlo on January 23, 2019, 09:41:12 pm
 Thank you Phill
http://www.housatoniccameraclub.com/gallery/

 Username: tester
    Password: tester
album: test
Title: Re: Upload problem
Post by: ron4mac on January 24, 2019, 01:18:11 am
You need to adjust your php.ini. Make sure that upload_max_filesize, post_max_size and memory_limit are set to a large enough value. For an image gallery, 16M, 32M and 256M, respectively, would be okay settings. And in the CPG config File Settings you need to set a value greater than 1M for file uploads.
Title: Re: Upload problem
Post by: lazlo on January 24, 2019, 01:46:07 am
I wonder if that is where the problem lies since I can upload the same file with single upload , but I cannot even upload a 10kb file with HTLM5 or Flash
Title: Re: Upload problem
Post by: lazlo on January 24, 2019, 01:51:01 am
I wonder if that is where the problem lies since I can upload the same file with single upload , but I cannot even upload a 10kb file with HTLM5 or Flash
Just wanted to add that the  upload_max_filesize, post_max_size are both set at 64MB  and memory_limit is set at 256MB
Title: Re: Upload problem
Post by: ron4mac on January 24, 2019, 03:15:51 am
Are you seeing the from the phpinfo menu item in your gallery?
Title: Re: Upload problem
Post by: lazlo on January 24, 2019, 03:10:14 pm
Yes, here is a screenshot:
Title: Re: Upload problem
Post by: ron4mac on January 24, 2019, 04:01:51 pm
You need to set the size in Config -> File settings -> Max size for uploaded files. Even if it looks okay, change its setting and save the config.
Title: Re: Upload problem
Post by: lazlo on January 24, 2019, 10:23:19 pm
I changed it to 1 gig but same problem. It has to be something else
Title: Re: Upload problem
Post by: ron4mac on January 24, 2019, 10:53:21 pm
Quite strange!!  You'll have to give me some greater access to your site. We can start with an admin account for your gallery (PM me with login). If that doesn't help find a solution, you may have to give me access to your files (I'll give you something to make that simple).
Title: Re: Upload problem
Post by: ron4mac on January 25, 2019, 02:29:41 am
The problem comes from the fact that your php memory_limit is set to -1 (I wasn't aware it could be).

In the file plugins/upload_h5a/initialize.inc.php, change line 41:
Code: [Select]
$this->sys_max_chnk_size = min($this->to_bytes(ini_get('upload_max_filesize')), $this->to_bytes(ini_get('post_max_size')), $this->to_bytes(ini_get('memory_limit')));to:
Code: [Select]
$this->sys_max_chnk_size = min($this->to_bytes(ini_get('upload_max_filesize')), $this->to_bytes(ini_get('post_max_size')));
That should take care of your issue. Changes will be made to keep it from being an issue in the future.
Title: Re: Upload problem
Post by: lazlo on January 25, 2019, 02:23:48 pm
Thank you Ron, this worked
Lazlo