Forums

Cannot upload media to self-hosted site

  1. Hi,

    I've recently moved over to hosting my site using Wordpress from Drupal. All is excellent so far but I cannot seem to upload images or other media using the app.

    I can use the app to upload images to my work's self-hosted WP, so the app is not the issue - it must be my setup. However, I cannot figure out where it's going wrong so I'm hoping you guys can help :)

    I've included as much pertinent information as I can, below. Please let me know if I can provide more. I can upload images as normal through the web both on a desktop and on the same mobile device.

    Thanks.
    --
    Wordpress self-hosted site, version 5.1
    http not https
    PHP version 7.2 (also tried with 5.4)
    App version 11.9-rc2 (also tried with non-beta version)

    .htaccess contains

    <IfModule php7_module>
       php_flag display_errors Off
       php_value max_execution_time 2000
       php_value max_input_time 6000
       php_value max_input_vars 1000
       php_value memory_limit 512M
       php_value post_max_size 100M
       php_value session.gc_maxlifetime 1440
       php_value session.save_path "/var/cpanel/php/sessions/ea-php54"
       php_value upload_max_filesize 100M
       php_flag zlib.output_compression Off
    </IfModule>

    php.ini contains

    asp_tags = Off
    display_errors = Off
    max_execution_time = 2000
    max_input_time = 6000
    max_input_vars = 1000
    memory_limit = 512M
    post_max_size = 100M
    session.gc_maxlifetime = 1440
    session.save_path = "/var/cpanel/php/sessions/ea-php54"
    upload_max_filesize = 100M
    zlib.output_compression = Off

    (both created by cPanel so not sure why in both places).

    Relevant parts from app log:

    WordPress - 11.9-rc-2 - Version code: 688
    Android device name: Google Pixel 2 XL
    
    46 - [Mar-04 20:58 MEDIA] MediaUploadHandler > Created
    47 - [Mar-04 20:58 POSTS] PostUploadHandler > Created
    48 - [Mar-04 20:58 MEDIA] MediaUploadHandler > Dispatching upload action for media with local id: 166 and path: /data/user/0/org.wordpress.android/cache/wp-14927915680639516563.jpg
    49 - [Mar-04 20:58 API] Dispatching action: MediaAction-UPDATE_MEDIA
    50 - [Mar-04 20:58 API] Dispatching action: MediaAction-UPLOAD_MEDIA
    51 - [Mar-04 20:58 MEDIA] MediaBrowser onMediaChanged > UPDATE_MEDIA
    52 - [Mar-04 20:58 MEDIA] starting upload for: 166
    53 - [Mar-04 20:58 API] Dispatching action: UploadAction-UPLOADED_MEDIA
    54 - [Mar-04 20:58 API] Dispatching action: MediaAction-UPLOADED_MEDIA
    55 - [Mar-04 20:58 MEDIA] MediaUploadHandler > 166 - progress: 0.047481503
    56 - [Mar-04 20:58 API] Dispatching action: SiteAction-FETCH_SITE
    57 - [Mar-04 20:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
    58 - [Mar-04 20:58 MEDIA] media upload failed: java.net.ProtocolException: expected 4182 bytes but received 4183
    59 - [Mar-04 20:58 MEDIA] mediaXMLRPCClient: removed id: 166 from current uploads, remaining: 0
    60 - [Mar-04 20:58 API] Dispatching action: UploadAction-UPLOADED_MEDIA
    61 - [Mar-04 20:58 API] Dispatching action: MediaAction-UPLOADED_MEDIA
    62 - [Mar-04 20:58 MEDIA] MediaUploadHandler > Error uploading media: expected 4182 bytes but received 4183
    63 - [Mar-04 20:58 API] Dispatching action: MediaAction-UPDATE_MEDIA
    64 - [Mar-04 20:58 STATS] 🔵 Tracked: media_service_upload_response_error, Properties: {"ext":"jpg","age_ms":82612255,"bytes":111732,"mime":"image\/jpeg","megapixels":0,"error_type":"GENERIC_ERROR"}
    65 - [Mar-04 20:58 STATS] 🔵 Tracked: media_service_upload_started, Properties: {"ext":"jpg","age_ms":82612260,"bytes":111732,"mime":"image\/jpeg","megapixels":0}
    66 - [Mar-04 20:58 MEDIA] MediaUploadHandler > No more media items to upload. Skipping this request.
    67 - [Mar-04 20:58 MEDIA] MediaUploadHandler > Completed
    68 - [Mar-04 20:58 MEDIA] updateNotificationErrorForMedia: Couldn't perform operation
    69 - [Mar-04 20:58 API] Dispatching action: PostAction-UPDATE_POST
    70 - [Mar-04 20:58 API] Dispatching action: UploadAction-CANCEL_POST
    71 - [Mar-04 20:58 POSTS] updateNotificationErrorForPost: There was an error uploading the media in this post: Couldn't perform operation.
    72 - [Mar-04 20:58 API] Dispatching action: ListAction-LIST_ITEMS_CHANGED
    73 - [Mar-04 20:58 API] Dispatching action: PostAction-UPDATE_POST
    74 - [Mar-04 20:58 API] Dispatching action: UploadAction-CANCEL_POST
    75 - [Mar-04 20:58 API] Dispatching action: ListAction-LIST_ITEMS_CHANGED
    76 - [Mar-04 20:58 POSTS] updateNotificationErrorForPost: There was an error uploading the media in this post: Couldn't perform operation.
    77 - [Mar-04 20:58 MAIN] UploadService > Completed
    78 - [Mar-04 20:58 API] Dispatching action: PostAction-UPDATE_POST
    79 - [Mar-04 20:58 API] Dispatching action: UploadAction-CANCEL_POST
    80 - [Mar-04 20:58 API] Dispatching action: ListAction-LIST_ITEMS_CHANGED
    81 - [Mar-04 20:58 POSTS] updateNotificationErrorForPost: There was an error uploading the media in this post: Couldn't perform operation.
    82 - [Mar-04 20:58 API] Dispatching action: PostAction-UPDATE_POST
    83 - [Mar-04 20:58 API] Dispatching action: UploadAction-CANCEL_POST
    84 - [Mar-04 20:58 API] Dispatching action: ListAction-LIST_ITEMS_CHANGED
    85 - [Mar-04 20:58 POSTS] updateNotificationErrorForPost: There was an error uploading the media in this post: Couldn't perform operation.
    86 - [Mar-04 20:58 MAIN] UploadService > Destroyed
    87 - [Mar-04 20:58 API] Dispatching action: SiteAction-FETCH_SITE
    88 - [Mar-04 20:58 MEDIA] MediaBrowser onMediaChanged > UPDATE_MEDIA
    89 - [Mar-04 20:58 API] long type could be misinterpreted when sent to the WordPress XMLRPC end point
    90 - [Mar-04 20:58 API] Dispatching action: SiteAction-UPDATE_SITE
  2. Hi pirsquared,

    Thanks for all that information and sorry to hear you're experiences problems uploading media via the app. Sometimes problems like this can be caused when XML-RPC is not functioning correctly.

    This is most commonly caused by either XML-RPC being blocked by your host, or by plugins that conflicts with it.

    You can find a list of known plugin conflicts here:
    http://ios.forums.wordpress.org/topic/app-blocking-plugin-list?replies=1#post-5985 However, there may be other plugins that cause problems with XML-RPC as well.

    To check whether a plugin is causing the conflict with the app, try deactivating all the plugins on your self-hosted site to see whether that fixes the issue.

    I'd be happy to run a few tests and see what I can find out. To better help you with this, please go to "Me > Help & Support" in the app and tap on "Contact us" so we can investigate it.

  3. Thank you, Anna - much appreciated. I have reached out via the app.

    Just to quickly answer your other questions, there are no running plugins at present on the site, and no obvious suggestion that the host is blocking XML-RPC. I found a supposed Wordpress XMLRPC checker - I don't know how legitimate it is but I plugged in my details and it came back with no errors.

    Grateful for your help.

Leave a Reply

You must log in to post.


About this Topic