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 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。