admin管理员组文章数量:1426115
I am running Linux CentOS 5.8 and I have my web pages using WordPress 4.0.
I am trying to uplad jpg photos to server via WordPress, but it randomly fails. I uploaded few photos, and then I get errors like:
“4.JPG” has failed to upload due to an error
The uploaded file was only partially uploaded.
Then I try again and again and again until it is successfuly uploaded. Very frustrating.
How can I debug this? Is there a log file? Where to look for?
I am running Linux CentOS 5.8 and I have my web pages using WordPress 4.0.
I am trying to uplad jpg photos to server via WordPress, but it randomly fails. I uploaded few photos, and then I get errors like:
“4.JPG” has failed to upload due to an error
The uploaded file was only partially uploaded.
Then I try again and again and again until it is successfuly uploaded. Very frustrating.
How can I debug this? Is there a log file? Where to look for?
Share Improve this question asked Jan 29, 2015 at 13:56 DanijelDanijel 1551 silver badge8 bronze badges 3- 1 Can you add more info on what webserver this is running on? Does this only happen with big files? – kraftner Commented Jan 29, 2015 at 14:07
- 1 Files are only 100 kB. Webserver is Apache. – Danijel Commented Jan 29, 2015 at 14:18
- 1 Same problem here. Apache/Debian. – Jo Smo Commented Nov 10, 2016 at 20:25
5 Answers
Reset to default 1I solved it by adding
<?php header ("Connection: close"); ?>
in file.php situated under wp-admin/include
Look at replay by Roberto:
https://stackoverflow/questions/33375823/error-dispatching-request-to-apache
RequestReadTimeout handshake=0 header=20-600,MinRate=500 body=20,MinRate=500
By default Apache will stop upload after 20-30 seconds. With this directive placed into Apache config upload will continue up to 600 seconds as long as user is sending at least 500 bytes/s.
I ran into the same problem and tried doing a google search and came up with so many technical suggestions that I could not begin to even start as I'm not tech savvy. I did run into an article where a blogger said she contacted her hosting server and they changed the PHP version. It may or may not work for me but I was going to try.
Only I didn't know how to do that and I just got off with customer support and basically what he did was increase my bandwidth. I still couldn't upload. I did tell him in the add media library page it did say max upload file size was 2MB. But it wasn't until I refresh the page that the change kicked in and I saw my maximum upload file size was 256 MB. After that I was able to upload photos just fine!
I managed to resolve this problem with changing Apache server configuration: there is a KeepAlive flag which needs to be turned Off.
More about this flag:
Apache Optimization: KeepAlive On or Off?
I solved this, by removing libapache2-mod-php5filter:
apt-get remove libapache2-mod-php5filter
and installing libapache2-mod-php5:
apt-get install libapache2-mod-php5
本文标签: phpFailed media upload quotThe uploaded file was only partially uploadedquot
版权声明:本文标题:php - Failed media upload: "The uploaded file was only partially uploaded." 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745415446a2657663.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论