I am uploading a file In Laravel. If I upload a file of 2 MB then it is working, but If I upload a file of 10 MB it is not working. If I check php.ini it shows max_post_size 1024 MB and max_file_upload 1024 MB.
It is working fine on local. I am using centos and nginx server.
Probably you should change your php configuration file to allow receipt of bigger files. See the accepted answer to the question "Change the maximum upload file size"
Update: "By default, Nginx has a limit of 1MB on file uploads. To set file upload size, you can use the client_max_body_size directive, which is part of Nginx’s ngx_http_core_module module. This directive can be set in the http, server or location context."
For details see https://www.tecmint.com/limit-file-upload-size-in-nginx/
Do you after changing max_post_size and max_file_upload restart nginx service?
Maybe in error log you saw the answer:
/var/log/nginx/nginx_error.log
Related
I am trying to upload large images to server (binary file upload) via postman, it works fine for files sized 2 MB and below, however for files > 2 MB the upload fails
I set php.ini
upload_max_filesize = 100M
post_max_size = 100M
and
nginx /etc/nginx/nginx.conf
client_body_buffer_size 100M;
client_max_body_size 100M;
but it doesn't work
I tried plupload package for chunk upload but it also doesn't work for files > 2 MB
Any ideas how to upload large images in laravel ?
It's doen't work because you set the wrong php.ini file
do this on laravel dd(phpinfo()) and look the right php.ini use by laravel in the value
Loaded Configuration File
may be I am a bit late for you , but for sake of everyone else , you may consider using this package
Resumablejs
it split file into chunks and upload each one, and if one failed , it will retry until all parts is completely uploaded.
I wanted to upload files greater than 2MB and I have changed php.ini as follows :
upload_max_filesize=20M
post_max_size=30M
Restarting Apache updates phpinfo() but files greater than 2MB are not yet being uploaded. What could be the reason?
Check that you updated the right php.ini, some servers accept having a php.ini for a certain folder
A similar question: Photo upload not uploading files bigger than 2MB
Basically you have to modify your php server's configuration as the link shows to you
I am try to uploading file on WordPress server.after 8 mb uploading file is break.There are three ways to increase the size of the uploading file.
PHP.ini (Changing the settings of PHP.ini file)
htaccess (Also change the settings in htaccess file but still of no use)
changing settings in wp-admin file.
all are not working.
Is it any other way to increase the size of the uploading file.
You have to configure this two things in php.ini upload_max_filesize and post_max_size then restart your webserver
Apart from the maximum filesize setting, try to look and configure max_execution_time and post_max_size in the php.ini if necessary. Then,restart Apache.
It depends on where you are uploading file ie. On which site.
What is your connection bandwidth.
How much uploading your WordPress service provider supporting.
Your script can have a limited set of time to be executed.
Try set the request timeout inside the php script with set_time_limit() (for a test on time limit, not for an upload)
Often, when the limit is represented by the size of file, you should have a message warning before the upload starts. In this case the server is letting you upload, so in most cases it's not a size problem.
Take into account also that some providers are imposing execution time from web server setup so you have to check this too. If I were you I'll try to execute a script that does nothing (wait) for some minutes, and see if that the time the request goes in timeout is the same for uploading a file.
I have a problem with the Ajaxplorer. I have configured it for uploading and downloading files and this is also working very well but just when the files are smaller than 100M. When I am trying to upload a bigger file there appears a I/O Error with an HTTP Error 404 (The upload is shown as completed but than the error appears).
Here is the configuration background:
PHP is running on a Windows Server 2008 R2
The max. uploading memory size is 2G (configured in the php.ini. This value is also shown in the
Ajaxplorer)
All relevant folder are writeable (i have configured the php session file and also in the
Ajaxplorer the temp file and after every uploading error i find in these directory a temporary
file so i think it´s writable)
Have you set your post_max_size as well?
--- php.net---
Sets max size of post data allowed. This setting also affects file upload.
To upload large files, this value must be larger than upload_max_filesize.
If memory limit is enabled by your configure script, memory_limit also
affects file uploading.
More info:
http://www.php.net/manual/en/ini.core.php#ini.post-max-size
i'm testing a website on my localhost not on the server
in php.ini max file size is 128 mb but i can't upload a 26 mb flv file it doesn't give me an error or anything the page just refreshes and nothing happens it doesn't upload but small large files are uploaded successfully any advice ?
Check upload_max_filesize and post_max_size in php.ini, .htaccess and web-server config. Make sure you're editing correct php.ini.
Yes, you'll need to ask to the hosting support via ticket. The limits depends from your hosting plan.