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
Related
i am new to Wordpress and PHP.
I have an issue with adding images to posts and pages. I can directly upload images to the Media Library (Dashboard/Media). I think the problem might be my custom theme. When i switch to a different theme the problem goes away.
When i try to add an image to the page it shows this error message: An error occurred in the upload. Please try again later.
Also, its not loading the existing images either.
I don't have any plugins installed.
Uploads folder reading and writing permissions is correct.
Any advice or tips that might help, would be appreciated.
A suggestion on how to debug it, would also help. I tried to use chrome developers tool bar, console but didn't find anything.
Media Library (Dashboard/Media) upload images is working fine.
Could it be an url issue?
If so where and how can i check my url setting for uploads folder
Thanks in advance.
Check the size of the file, edit your .htaccess
<IfModule mod_php5.c>
php_value post_max_size 200M
php_value upload_max_filesize 200M
php_value memory_limit 300M
php_value max_execution_time 259200
php_value max_input_time 259200
php_value session.gc_maxlifetime 1200
</IfModule>
or edit your file php.ini
max_execution_time = 180
max_input_time = 600
post_max_size = 128M
upload_max_filesize = 256M
safe_mode = off
PD : Change and test different values
Edit File on Godaddy : https://www.drupal.org/node/1209090 + https://stackoverflow.com/questions/21926795/how-to-create-php-ini-file-in-godaddy
Solved the problem. Just in case someone else have the same problem. We had written comments in the HTML sections of the page. Even thought the comments was comment out, it seemed to cause the problem. Hope this will help someone else
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 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.
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.