#File Upload Max Size
43 messages · Page 1 of 1 (latest)
It means the file is larger than the server could handle
Is this local or in production
cPanel usually means shared hosting, which means you might not have the ability to change the settings required to fix this
Hmm
You can configure max size sent over the webserver, which in the case of shared hosting means Apache
Please guide me, I have already looked php.ini
I am not familiar with Apache so I don't know how to do that, in NGINX it's just a directive to say the max size
yes, but that's PHP
You can halt file size on the webserver, which looks like is the case on that error on the image
Which means you need to configure Apache to allow filesizes >8M
Then why are you still editing the php.ini if the problem isn't there? You should Google around for solutions that cover "file size apache": https://www.tecmint.com/limit-user-file-upload-size-in-apache/
But again, not sure you have permission to edit this stuff on shared hosting. Haven't used it in ages, and certainly haven't used Apache for years.
Thank you. Will keep try. @elder crest
Otherwise wait around for some Apache experts to drop by 😉
if it's a cpanel is there a software section and in there a select php version in your panel?
@slender tide You can’t upload files multiple megabytes in size in one to like this. You’re either going to hit a timeout or exceed available memory. You should instead be doing chunked uploading, where you send the file in multiple smaller parts.
Oh,
Checkout https://github.com/pionl/laravel-chunk-upload for use or reference on chunking. I use it myself, capping my upload max to 20MB and having the frontend do the file slicing and uploading.
Though at some point, using a proper storage bucket may be in your best interest.
I had never heard of this feature, didn't know you could chunk on the front end. This solves a lot of problems
ok I am here, there are 2 places you have to change. you got the one, upload_max_filesize, but there is another one as well. post_max_size - make sure both are set to what you require.
post_max_size also is 20M
The other thing is, depending on how you are doing it, will define what php.ini you are accessing. For example, if you are using some random CLI that bypasses the webserver, you need to change the cli php.ini
the EASIEST way to find out if you are actually making the right changes is to create a dummy php file. so in the root of your webserver, create a file called info.php
<?php
phpinfo();
?>
then open that file up and check what your results are
if they look correct there, then you want to check your cli, then type at a comamnd php -i
Keep in mind that because you're on shared hosting, you won't be able to exceed the values that the server admin put in place (or maybe not change them at all if they are strict).
Correct, which is why I suggest creating the php info file. You will find out if you are even making changes that are being taken into effect
side note: this is why I don't use shared hosting anymore and find forge with a DO droplet or just a $5 droplet is easier
Works wonders. I needed to be able to ingest large 3d assets directly since our internal systems need direct file access, thus S3 was not viable for us, as I would need to download files every single time the internal stuff needed to act on it. So I use the above package, but purely for their basic request handler, as we wrote a basic but functional slicer in our React frontend that does the job. Just need to add headers for the current chunk and total chunks. Keep in mind that the final uploaded chunk will trigger it to be assembled, thus will usually take the longest.
The error is webserver related, upping the value in php configuration isn't gonna do squat
Ok that’s fine but one step at a time is key. So my next suggestion would be adding an .htaccess file and using that to attempt to override Apache , but be warned, some Shared hosting don’t like that.
If you read the first few messages in the thread all this has already been said 😬