当我在wordpress中上传图像时,我收到HTTP错误。虽然图像插入上传文件夹。但是它显示错误。
我已尝试使用.htaccess工作.. SecFilterEngine关闭SecFilterScanPOST关..但没有工作。我也尝试了上传文件夹问题的权限。我在debug.log中没有任何错误,只有少数PHP注意我有wordpress 3.3,windows与apache服务器。
只是尝试添加下面的代码主题的functions.php文件:
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
有关解决此问题的更多方法,请访问此链接HOW TO FIX HTTP ERROR WHEN UPLOADING IMAGES
安装“默认为GD”插件“将GD设置为默认的WP_Image_Editor类”。
这个插件(目前)在这里可用:https://github.com/getsource/default-to-gd/blob/master/default-to-gd.php
它有功能:
<?php
/*
Plugin Name: Default to GD
Plugin URI: http://wordpress.org/extend/plugins/default-to-gd
Description: Sets GD as default WP_Image_Editor class.
Author: Mike Schroder
Version: 1.0
Author URI: http://www.getsource.net/
*/
function ms_image_editor_default_to_gd( $editors ) {
$gd_editor = 'WP_Image_Editor_GD';
$editors = array_diff( $editors, array( $gd_editor ) );
array_unshift( $editors, $gd_editor );
return $editors;
}
add_filter( 'wp_image_editors', 'ms_image_editor_default_to_gd' );
尝试通过File-Zilla或其他ftp解决方案而不是内置实用程序上传图像?
只是一个建议。
我遇到了同样的问题。问题出在Wordfence插件防火墙上。我把它变成了“学习模式”,上传工作正常。
对我不起作用。我的解决方案(适用于FastCGI模式下的CentOS和php):
1)打开/etc/httpd/conf.d/fcgid.conf
2)添加或更改以下参数的值:
FcgidConnectTimeout 20
MaxRequestLen 64000000
FcgidMaxRequestLen 64000000
3)重启apache
apachectl restart
我正在使用ubuntu并且无法将图像(http error
)上传到我的localhost中的wordpress网站。在我的情况下,我尝试通过浏览器上传到meida(而不是拖放)我看到我无法访问该位置(在我的外部硬盘中)。
所以我将文件复制到桌面,并且能够毫无问题地加载它。