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
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 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.
We are facing an issue in file uploading on windows server running php. Bigger files are not uploading to the server. The site is hosted in a windows 2008 server and the webserver is IIS 7.
Sometimes it is possible to upload 22MB files, but sometimes the upload fails for 10 MB file. There is no error messages in the log files.
We have set very higher values in PHP.ini files.
max_execution_time 1800
max_input_time 1800
memory_limit = 5000M
upload_max_filesize = 60M
max_file_uploads = 40
post_max_size = 400
We also tried to increase the IIS upload limit by adding the values in web.conf file. It's also not solved the issue.
maxRequestLength="204800"
requestLengthDiskThreshold="204800"
executionTimeout="3600"
maxAllowedContentLength="204800000"
http://support.myeasyprojects.net/KB/a53/uploading-large-files-times-out.aspx
We are in the middle of a very confusing issue. Can anyone help us out on this?
post_max_size should match upload_max_filesize because files are sent with POST.
Memory limit is very high, do you really need all that memory? 256M should be enough.
My suggested configuration:
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
Need to do the following setting into the php.ini files. which is located into your c:\php
post_max_size (it should be greater than the upload_max_filesize);
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 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