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.
Related
So I have wordpress plugin that sets my max upload file size and currently it is set to 536mb. (which should be more then enough) But still when I try to upload 3,3 mb .xml file I get an error:
The uploaded file exceeds the upload_max_filesize directive in php.ini.
When trying to Upload
I had the same problem. I tried editing the wp-config.php file and added:
define('WP_MEMORY_LIMIT', '32M');
edited the .htaccess and added:
php_value upload_max_filesize 32M
php_value post_max_size 32M
php_value max_execution_time 300
php_value max_input_time 300
none of the above seemed to work for me. I also tried locating the php.ini file on my directory but couldn't find it.
I created my php.ini file and added:
php_value upload_max_filesize 64M
php_value post_max_size 32M
still nothing changed.
MY SOLUTION
I went back to my cPanel home page and located the MultiPHP INI Editor under the SOFTWARE tab, selected my domain name from the dropdown menu and opened its PHP configuration, scrolled down to the bottom and located the upload_max_filesize directive and changed it from 2MB to the size i want.
That solved my problem. Hope it works for you as well
Open the php.ini file on your hosting server (Typically located somewhere like:
/usr/bin/php5/bin/php.ini in Linux) and adjust the following lines:
; Maximum allowed size for uploaded files.
upload_max_filesize = 536M
; Must be greater than or equal to upload_max_filesize
post_max_size = 536M
I have created a custom module in magento and it has an option of import csv file.
it uploads file upto 8MB but when i try to upload bigger than 8MB file, it uploads the file in directory but doesn't make any entry in database.
I have set those configuration in php.ini but still no luck.
php_value upload_max_filesize 20M
php_value post_max_size 24M
php_value max_input_time 300
php_value max_execution_time 3000
Please help
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 need to make a module for uploading files with type *.flv in PHP.
I have been successful in uploading small files but am unable to upload large files.
I have updated PHP values like
php_value memory_limit 120M
php_value max_execution_time 120
php_value upload_max_filesize 10G
php_value post_max_size 10G
php_value max_input_time 500
I am doing a file upload using PHP, which works fine for a file of size 2.8MB on my localhost - but not my Mediatemple GS host. Files smaller than 2MB work fine, but anything larger seems to not work. I am not getting any error message but when the upload finishes, the file is not found in the uploads directory.
I searched around, and added the following lines to the .htaccess file:
php_value memory_limit 120M
php_value max_execution_time 120
php_value upload_max_filesize 10G
php_value post_max_size 10G
php_value max_input_time 500
but it is still not working. Please help.
Maybe your max_execution_time is more 2 minutes !
check how time your script run.
Usually for upload big file developper use FTP or host sharing. (megaupload/rapidshare/...)
i guess all you need is
ini_set("memory_limit","2048M"); # 2 GB
set_time_limit(0); # unlimited exec time
i read somewhere in PHPdocs that it only allows upto 2GB file transfer