I recently asked a question about this, but think after 2 days of troubleshooting I have a better question to ask.
Using fputcsv works great until the file is 4KB or bigger. How can I increase this limit? I have tested the following:
php_value post_max_size 200M
php_value upload_max_filesize 200M
php_value memory_limit 3000M
php_value max_execution_time 259200
php_value max_input_time 259200
php_value session.gc_maxlifetime 1200
and I see the changes being reflected in phpinfo, however apparently none of these are related to the issue.
Any other ideas what global settings might be causing this issue?
Some other things to consider
upload_tmp_dir
The temporary directory used for storing files when doing file upload.
post_max_size
Sets max size of post data allowed. This setting also affects file upload
file_uploads
Whether or not to allow HTTP file uploads.
Related
I have file uploads on my site, these work fine, but for some reason larger files ( anything over 1GB really ) in chrome gives Aw Snap error, this does not happen in any other browser.
Ive tried looking into it and cant find any information as to a work around on this error. Does anyone know how I can overcome this issue?
Is this something I can sort out on my server to stop the error, the only thing ive been able to find is re-fresh your browser to fix the issue.
Thanks for any support
update your google-chrome browser..
and increase these values in php.ini file
upload_max_filesize = 200M
post_max_size = 210M
max_execution_time = 500
max_input_time = 500
default_socket_timeout = 500
and if you can't access the php.ini file, you can edit these values using .htaccess file, by
php_value session.gc_maxlifetime 10800
php_value max_input_time 10800
php_value max_execution_time 10800
php_value upload_max_filesize 200M
php_value post_max_size 210M
php_value memory_limit 500M
and give it a try.. it worked for me
I know it's too late answer, but hope it could help you if you still have the same issue, or it could anyone facing the same problem
I have a problem with adding multiple files on my server. Everything works fine on smaller files (<20MB). They are uploading on the server and into my data base without any errors or problems. But when I want to add files bigger than 20MB (for example 10 files, 2,2MB each) uploading doesn't work. There is no error, just nothing is sended via _POST. I tried to change php.ini files, but it is still the same problem.
I've increased:
max_execution_time to one hour
max_file_uploads to 100 files
memory_limit to 512M
output_buffering to 30M (earlier I've turned it off)
post_max_size to 64MB
upload_max_filesize to 64M
The website is on OVH hosting, so every changes I've made in .user.ini file. When I'm trying phpinfo() it shows values which I've changed.
Anyone knows any solution?
in your .htaccess file, this allow me to add upto 2 GB
php_value upload_max_filesize 2048M
php_value post_max_size 2048M
php_value max_execution_time 259200
I am facing a problem while uploading a file/ image in PHP. When I uplopad an 8kb file it works fine but when I upload more that 50kb file it keeps on loading and do nothing, I have checked upto 5 mins. The path to phpinfo() on my server is http://kogd.tw/jatin.php
I have tried to set following variables in my .htacess file but nothing worked.
php_value file_uploads On
php_value memory_limit 1024M
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
Can anyone please help me regarding it.
To know the problem more, please try to upload a file on link http://kogd.tw/jatin_upload.php
You can try to cahnge de default values with ini_set
ini_set("upload_max_filesize","60M");
ini_set("post_max_size","64M");
change the MB whatever you want to.
I've written a php script for uploading file to my website. But it shows some error messages when the file size exceeds 8MB. It came to know that post_max_size and upload_max_filesize are 8M and 4M. I haven't any access to the php.ini file where I hosted my site. I have tried to change the value of these variable using ini_set() and also created an htaccess file for doing the same when the first method became a big flop. This is the code in the htaccess file.
php_value upload_max_filesize 100M
php_value max_execution_time 800
php_value post_max_size 100M
php_value max_input_time 100
php_value memory_limit 120M
Any solution to fix this issue?
You haven't written which SAPI you're using, so this might not always work:
http://php.net/manual/en/configuration.changes.php
You must have PHP configured as Apache module to make your configuration work.
Double check the documentation if this applies for your use-case and double check your server configuration.
Additionally I don't know if writing 120M is correct here or you need to write the number of bytes as a number only.
Next to that there is an alternative approach with ini files per directory, see
http://php.net/manual/en/configuration.file.per-user.php
This might be a workaround for your case.
I ask because since max_input_time is the only that should be set accordingly to facilitate the upload process, how would you ever know what to set it to. Everyone's connection is different some may take longer to upload then others.
Also what are the risks of setting it too high? For example if i choose to allow users to upload bigger files then 5MB.
Please give me as much details as possible on the matter. Thanks.
Use this for big size file upload in .htaccess
php_value memory_limit 300M
php_value upload_max_filesize 200M
php_value post_max_size 200M
php_value max_execution_time 80000
php_value max_input_time 80000