Is there anything that would be preventing a PHP SOAP Service from uploading a file larger than about 15MB? Smaller files work great, but larger ones fail without any noticeable errors.
Settings that I might need to change? Nothing in the apache logs.
Make sure you've set upload_max_filesize in your php.ini to a value higher than 15MB. For example:
upload_max_filesize = 20M
post_max_size = 20M
Related
I am having a problem with uploading files bigger than a certain size (around 150MB/200MB) to my server.
Because I do not have this problem on my local server, I suspect it has something to do with settings on the shared server which I rent that runs Apache.
The error that I am getting is HTML error 413 Request Entity Too Large
Ofcourse I have done some research and found that the php settings on the server are set correctly as follows:
max_input_time = 24000
max_execution_time = 24000
upload_max_filesize = 2048M
post_max_size = 2048M
memory_limit = 4096M
max_input_vars = 2000
Furthermore, because the server runs on Apache, I made sure to also add
LimitRequestBody 2147483647 and
SSLRenegBufferSize 2147483647 to the .htaccess file which translate to 2GB for both settings.
For the code I just use the PHP move_uploaded_file($_FILES["video"]["tmp_name"], "../videos/". $newVideoName)) method which, one again, does work with smaller files.
Is anyone familiar with this problem or have any other solutions on how to fix this problem? I did talk the my host and they have said that there aren't any restriction on uploaded filesizes other than the PHP settings which I have changed.
Thanks upfront!
I'm trying to upload big files using PHP and it's not working and the size is around 855 ko. I've already tried uploading smaller files and its worked so i'm sure that my problem that causing the error.
I've already tried most of the solution in SO and google but in vain. Some said that i should try to configure my php.ini and i did but without success.
I'm using lighttpd on an embedded system.
My php.ini configuration :
max_execution_time = 300; Maximum execution time of each script, in seconds
max_input_time = 25200; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 40M ; Maximum amount of memory a script may consume (128MB)
file_uploads = On
upload_tmp_dir =/home/imagesdcard/www/
upload_max_filesize = 10M
max_file_uploads=2
I had tried many solutions that suggesting it was caused by certains configurations in php.ini and i had changed it but without success.So, i wanna ask how can i upload big files using php?
Thank you in advance for all advice and help and have a great day.
By configuration, PHP only allows to upload files up to a certain size. There are lots of articles around the web that explain how to modify this limit. Below are a few of them:
PHP Increase Upload File Size Limit
How do I increase the PHP upload limits?
For instance, you can edit your php.ini file and set:
memory_limit = 32M
upload_max_filesize = 24M
post_max_size = 32M
You will then need to restart apache.
I have a dedicated server Linux WHM/Cpanel that hosts a video streaming website. I have a form to upload videos and I've been trying to upload larger files but failing? I've checked error logs and nothing is leading me in the right direction. Below are my php.ini settings
upload_max_filesize = 1200M
post_max_size = 1200M
max_input_vars = 1000
memory_limit = -1
max_file_uploads = 20
max_execution_time = 7200
max_input_time = 7200
max_input_vars = 1000
I can upload a 100MB file just fine but the movies i have can be up to 1gb. I'm using Plupload to upload files. I've tested several small size files and they upload fine. When I try to upload large movies e.g. 300mb, Plupload returns this error HTTP Error. Upload URL might be wrong or doesn't exist. and this is the only clue I have. Plupload uses chunking to split up large files also.
This only happens with larger files. It's really a nuisance also, since I have to upload large files all over again to see if my changes are successful or not.
Any ideas? Why would it work with a smaller size file but not larger? I have no errors to work from.
HTTP Error is common when there is something wrong with the files being uploaded. Please check your server info with php.ini
upload_max_filesize is the limit of any single file.
post_max_size is the limit of the entire body of the request,
Sometimes the server requires post_max_size greater than upload_max_filesize I might be wrong but I have to check.
Try debugging the issue removing the chunking first and then later add the chunking part when you remove those HTTP errors.
I read so many articles out there in the internet and found that to change the php.ini file to upgrade the upload limit. But I do all the suffs and cant upload more than 10mb of files or so.
I am trying to add a feature to upload video file through the front end for users. But failed for some reason
Is there any other way to do it. Or is it because it is a video file or some thing like that
Make sure that you have (in php.ini, .htaccess, etc.):
increased post_max_size to at least twice the max file size that you might need to upload
increased upload_max_filesize to the max file size that you might want to upload
increased memory_limit to something bigger than post_max_size
On top of setting php.ini
upload_max_filesize = 200M
post_max_size = 200M
I owuld look into a flash uploader like uploadify. It will make your life much easier trust me.
Since you are changing the php.ini, are you restarting the webserver so that the changes take effect (if using mod_php)? Does the webserver itself have any restrictions set?
It's been a while since I've done this, but in my php.ini I have upload_max_filesize = 200M and I have post_max_size = 200M
I also set max_execution_time = 3000 If this is set too low, it'll cut off while the user is still uploading.
You should also bump up max_input_time and memory_limit
I am developing a CMS where the clients will need to upload files larger than 2mb - up to 10mb at least. I have changed the details in the php.ini file and I cannot see anywhere else that the problem might be. Any help?
Cheers
Here's what I recommend changing (assuming Apache & PHP):
I've found this works well for up to about 30mb attachments
PHP Settings
max_execution_time = 120
max_input_time = 120
memory_limit = 30M
post_max_size = 30M
upload_max_filesize 30M
file_uploads = On (although it sounds like you already have this turned)
Apache Settings
LimitRequestBody 31457280
You need to set upload_max_filesize, post_max_size and memory_limit appropriately. post_max_size must be larger than upload_max_filesize, because there needs to be memory allocated for the request headers as well as the file payload.
In your php.ini:
; Maximum allowed size for uploaded files.
upload_max_filesize = 50M
; Maximum size of POST data that PHP will accept.
post_max_size = 50M
What errors are you getting in your error log once these have been done? Is it possible that your uploaded file is running foul of the memory limit on the script?
You can set the memory limit higher for this particular script by including the following line in your script:
ini_set("memory_limit","75M");
Make sure you changed upload_max_filesize AND post_max_size
As long as you have restarted your web service (ie apache) then the changes should take effect, however if you are developing for anyone other then yourself then instead of changing the php.ini I would add this to the upload script:
ini_set('upload_max_filesize', '10M');
as some people may not be able to modify php.ini this will change it just for the page it is on.