File size limit on files being uploading via Upload Files?
Having trouble with a file just over 5Mb. Didn't think there were any file size restrictions integrated into the behaviour. Can you please confirm/clarify?
Thank you.
NJ
Having trouble with a file just over 5Mb. Didn't think there were any file size restrictions integrated into the behaviour. Can you please confirm/clarify?
Thank you.
NJ
Your php.ini file will set file upload size restrictions. Get a list of your server settings with:
<?php
phpinfo();
?>
Hi Ray.
max_file_uploads is showing as 20Mb, which the host has confirmed is the limit.
My INSERT page, therefore, seems to be the issue. Please find login creds and URL below.
Thank you.
NJ
I'd need FTP access to debug this.
Hi Ray. FTP details in the private section. Here's what the host came back with...
"I have enabled logging on the hosting, and attempted to upload a roughly 10MB image. Looking at the logs it appears to be down to the script hitting the memory limit
[Thu May 21 14:48:48.060763 2020] [fcgid:warn] [pid 17744] [client 82.165.232.19:61479] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 45056 bytes) in /home/domains/vol4/809/2092809/user/htdocs/webassist/file_manipulation/helperphp.php on line 962, referer: http://www.aaronhjones.com/njadmin/add_highres.php?v=1
[Thu May 21 14:59:11.318341 2020] [fcgid:warn] [pid 17748] [client 82.165.232.19:18299] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 45056 bytes) in /home/domains/vol4/809/2092809/user/htdocs/webassist/file_manipulation/helperphp.php on line 962, referer: http://www.aaronhjones.com/njadmin/add_highres.php?v=1"
Hope you can help. Thank you.
NJ
This is because you are using image resize for the files when they upload. It takes a lot of memory to load a 10mb image and shrink it down on the fly.
You would have to increase your memory_limit in your php.in file to fix this issue.
How much more memory?
Clearly it’s at least triple the file size because we’ve tried to upload a 5Mb file and it failed.
20Mb doesn’t seem very generous and we have clients complaining about it as some of them need to upload high-res images.
Thank you
NJ
Set the memory limit higher if you can. Also realize that the dimensions are more important than the file size (as the file size is for a compressed image). When you open an image in GD, every pixel gets 3-4 bytes allocated to it, RGB and possibly A. Thus, your 4912px x 3264px image needs to use 48,098,304 to 64,131,072 bytes of memory, plus there is overhead and any other memory your script is using.
It's a shared hosting platform so I have my doubts that I'll be able to increase the memory limit. I will ask the question though.
What is GD sorry?
I'm developing quite basic brochure style websites at the moment, but they're for musicians/artists and they need to offer a high-res image as part of an electronic press kit. Most of these guys are trying to upload 15Mb+ high-res photos off their Mac, or whatever, so this is going to be really restrictive.
I'm using the image re-size simply to create a thumbnail on the fly.
This could be a serious problem. :(
Will see what the host says. Thank you.
NJ
Also, forgot to ask why the page just goes blank white? Obviously the file limit is reached, but shouldn't that then do something. I'm not sure I have control over what then appears to tell clients that they've exceeded the file size limit.
Is there validation that can be added, for example, to prevent upload of files that are larger than....? Oh jeez, I don't know what we'd have to say to clients here.
Hoping you might have a suggestion/solution, outwith increasing the memory limit.
Thank you.
NJ
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.