【发布时间】:2015-02-02 19:38:46
【问题描述】:
我在 wordpress 中上传大文件时遇到问题。我只能上传最大 40mb 的文件。 这是我的 htaccess 文件的外观
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 year"
</IfModule>
## EXPIRES CACHING ##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
php_value memory_limit 300M
php_value post_max_size 300M
php_value upload_max_filesize 300M
我的 php.ini:
upload_max_filesize= 300M
post_max_size= 300M
max_execution_time=3200 memory_limit = 300M
date.timezone=Europe/Sofia
memory=250M
expose_php=on
display_errors=on
allow_url_fopen=on
output_buffering=off
max_input_time=3600
session.gs_maxlifetime=3600
max_input_vars=1000
memory_limit=256M
extension=mysqli.so
extension=openssl.so
我在 wp-config 文件中设置了内存限制: 定义('WP_MEMORY_LIMIT', '300M');
这不是服务器主机问题。他们向我保证,问题不在他们身上。 我的问题是..我做错了什么?为什么我不能上传大于 40 MB 的文件。
【问题讨论】:
-
您是否收到任何有意义的错误消息?
-
我收到 http 错误。在发布请求中我得到:(失败)net::ERR_CONNECTION_RESET
-
您的主机是否使用 suhosin?还有你尝试上传后的错误日志说什么?
-
不,我的主机不使用 suhosin。我的日志文件中没有注册错误。