douyan8413 2018-04-05 11:44
浏览 123

无法在Wordpress 4.9.5中上传图像

I've been wrestling with this for 2 days, I've tried everything that Google searching for 2 days has to offer, and still I can't get it to work. Basically, when I'm editing a page and adding a "featured image" the upload is interrupted and all I'm left with is the blue progress bar. I opened the console and I see that there's a an error that reads "/wp-admin/async-upload.php 404 (Not Found)" in "load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:12".

load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:9 JQMIGRATE: Migrate is installed, version 1.4.1
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:12 POST http://www.handi-gamer.com/wp-admin/async-upload.php 404 (Not Found)
send @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:12
exec @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
shimExec @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
exec @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
e @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:12
i @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:12
send @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:12
f @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
r @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
dispatchEvent @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
h @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
start @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,sug&load[]=gest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,jquery-ui-position,jquery-ui-menu,wp-a11y,jquery&load[]=-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,thickbox,shortcode,backbone,wp-util,wp-backbone,&load[]=media-models,wp-plupload,wp-mediaelement,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imgareaselect,image-e&load[]=dit,svg-painter,wp-auth-check,editor,wplink,media-upload,wp-embed&ver=4.9.5:462
dispatchEvent @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
setTimeout (async)
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
d @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
d @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
d @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
e @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
d @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
d @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
e @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
addFile @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
i.onchange @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:14
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
(anonymous) @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
d @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
e @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
dispatchEvent @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
trigger @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:11
q @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.5:12

Just to show how desperate I was, I've tried deleting all the Files on the FTP-server and deleting the database , then reinstalling everything from scratch (even removed the cookies from my browser) just to make sure it's a clean install. Everything else works fine, but uploading an image doesn't work. I resized and saved the image from a JPEG to a smaller PNG, as some users online said that PNG worked better, but that didn't help either. Worth noting is that I am able to upload another, much smaller image, but the one I'm trying to upload is not over the limit. I even tried changing the limit to something farfetched like 64M.

I've checked the privileges on all the files and folders, they are set correctly.

I also tried all the .htaccess tricks that I found as suggestions on other threads. The only thing I haven't tried, and I don't think I even can, is to change from GD to ImageMagick as someone suggested. But I'm on a shared server and it doesn't have ImageMagick. That said, since I already tried changing the format and size of the image, it feels like it shouldn't be GD's fault.

Any other suggestions or idea are very welcome, I'm desperate to get this fixed or else it will be an image-less website!

P.S. I want to note that the very FIRST time I installed Wordpress on this server it worked just fine, the image was uploaded. But for various reason (trouble with the database) I had to reinstall it and that's when this started. But like I said I created a brand new database when I reinstalled it and it doesn't affect anything else.

UPDATE: So I just tested the limits of which images work and which don't, and I found something that may be a clue to someone else... the actual pixel resolution of the image doesn't seem to matter, but the image does seem to work as soon as it's compressed down to exactly 124Kb, I tested this on multiple images (although admittedly I didn't try 125Kb, but 126 and 127 didn't seem to work so I'm just assuming 125 wouldnt work either). I'm made sure the file upload limit in php.ini is 5M, so what else could be limiting uploads to 124Kb?

  • 写回答

1条回答 默认 最新

  • dongzhaiqiang6108 2018-04-06 07:52
    关注

    So I've solved the problem. Or more accurately, I asked my web host to solve the problem. After spending an hour or two testing the limits of what exactly can and can't be uploaded (see mu update in the original question), I started Googling on those limits and found suggestions that it had something to do with MaxRequestLen or FcgidMaxRequestLen. So I contacted my web host and they were kind enough to increase the limit to 20 mb. They also mentioned that modsec had been triggered so they disabled that as well, now I can upload large images again. Hope this helps some poor lost soul looking for answers :)

    评论

报告相同问题?

悬赏问题

  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝