PHP: Having trouble uploading large files

2019-02-15 23:51发布

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 googled around, and I 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

I know some of the above values are a overkill, but even then, this does not seem to help... Anything else I might be missing?

2条回答
不美不萌又怎样
2楼-- · 2019-02-16 00:38

The one you missed is max_input_time, and do check whether your edits are reflected in phpinfo();.

查看更多
该账号已被封号
3楼-- · 2019-02-16 00:41

Check the phpinfo() and look for these four values - it's possible that the changes you think you're making haven't been applied, or that something else is overriding your changes. The values you've changed look correct to me.

查看更多
登录 后发表回答