错误“文件为空”在WordPress上传图片时 [英] Error "file is empty" when uploading images in WordPress

查看:205
本文介绍了错误“文件为空”在WordPress上传图片时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在亚马逊网络服务EC2 机器上运行一个Debian自定义安装的 WordPress 2.9.2 博客。



一切工作正常,直到星期一。然后是星期二,突然间,一夜之间,我无法使用默认的WP文件上传(flash或html)上传图片。



当我尝试上传图片,它显示以下错误:


文件为空。请上传更实质的内容。这个错误也可能是由于您的php.ini中的上传功能被禁用或者post_max_size被定义为小于php.ini中的upload_max_filesize引起的。


所以我查看了我的 php.ini ,并修改了一些设置如下: :64M

  • post_max_size :90M
  • li>
  • max_excecution_time :600

  • max_input_time :600 ul>

    但是没有奏效。然后,我尝试了 chmod - wp-content / uploads / 文件夹及其子文件夹 777 。没有工作。

    对Google进行了一些研究,并在 .htaccess 中添加以下内容:

     < IfModule mod_security.c> 
    SetEnvIfNoCase Content-Type
    ^ multipart / form-data; MODSEC_NOPOSTBUFFERING =不要缓冲文件上传
    < / IfModule>

    < IfModule mod_gzip.c>
    mod_gzip_on否
    < / IfModule>

    没有工作。最后,在 wp-settings.php 文件中增加了WPs内存限制。没有工作。



    所以我现在都没有选择。任何人有任何想法如何解决这个问题?这是真正的窃听我和我的客户!

    感谢提前!

    解决方案

    不知道是不是这种情况(已经过了一年多了),但在很多情况下,对于同样的问题,问题是由于硬盘满了



    愚蠢的,我知道。

    只要检查剩下多少空间,如果没有,就删除日志。 Apache,PHP,MySQL。当足够的时间给他们时,他们加起来很多数据。


    I'm running a WordPress 2.9.2 Blog with a custom install of Debian in a Amazon Web Services EC2 machine.

    Everything was working fine until monday. Then came tuesday, and suddendly, overnight, I can't upload pictures using the default WP file uploader (either flash or html).

    When I try to upload a picture, it displays the following error:

    File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini

    So I checked out my php.ini, and modified some settings as follows:

    • upload_max_filesize: 64M
    • post_max_size: 90M
    • memory_limit: 128M
    • max_excecution_time: 600
    • max_input_time: 600

    But it didn't work. Then I tried chmod -ing the wp-content/uploads/ folder and its subfolders to 777. Didn't work.

    Did some research on Google, and added following lines to .htaccess:

    <IfModule mod_security.c>
    SetEnvIfNoCase Content-Type
    "^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
    </IfModule>
    
    <IfModule mod_gzip.c>
    mod_gzip_on No
    </IfModule>
    

    Didn't work. Finally, increased WPs memory limit in wp-settings.php file. Didn't work.

    So I'm all out of options by now. Anyone has any ideas on how to solve this? It's really bugging me and my client off!

    Thanks in advance!

    解决方案

    Not sure if this was the case (it has been over a year), but in many cases, for this same issue, the problem was due the hard drive being full.

    Stupid, I know.

    Just check how much space is left, and, if none, go delete logs. Apache, PHP, MySQL. They add up a lot of data when enough time is given.

    这篇关于错误“文件为空”在WordPress上传图片时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆