简体   繁体   English

PHP-无法上传大于20MB的文件

[英]PHP - can't upload files bigger than 20MB

I have a problem with adding multiple files on my server. 我在服务器上添加多个文件时遇到问题。 Everything works fine on smaller files (<20MB). 在较小的文件(<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. 但是,当我想添加大于20MB的文件(例如10个文件,每个文件有2.2MB)时,上传不起作用。 There is no error, just nothing is sended via _POST. 没有错误,通过_POST没有任何发送。 I tried to change php.ini files, but it is still the same problem. 我试图更改php.ini文件,但是仍然是同样的问题。
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. 该网站位于OVH托管上,因此我对.user.ini文件进行了所有更改。
When I'm trying phpinfo() it shows values which I've changed. 当我尝试phpinfo()它显示我更改的值。

Anyone knows any solution? 有人知道解决方案吗?

in your .htaccess file, this allow me to add upto 2 GB 在您的.htaccess文件中,这使我最多可以添加2 GB

php_value upload_max_filesize 2048M
php_value post_max_size 2048M
php_value max_execution_time 259200

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM