ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MarsEdit -- upload to EE issue

November 29, 2011 10:38am

Subscribe [2]
  • #1 / Nov 29, 2011 10:38am

    dreas

    61 posts

    I am attempting to upload to Expression engine v 2.3.1 & MSM 2.1.1 using MetaWeblog API in MarsEdit 3.3.5 but sadly am getting a failure message

    the marsedit error reads
    “The post could not be published because of an error while uploading an attached file. If this problem persists, try deleting the attachment from the Uploads list and re-attaching it. Unable to Upload File.”

    here is the header of the XML response:
    URL: http://site.com/home/index.php?ACT=20&id=6
    Method name: metaWeblog.newMediaObject
    Network reply received: 2011-11-25 11:46:03 +0100
    URL: http://site.com/home/index.php?ACT=20&id=6
    Method name: metaWeblog.newMediaObject
    Status code: 200
    Succeeded: NO
    —Fault Error—
    Fault code: 810
    Fault string: Unable to Upload File

    *note that site is housed in subfolder “home”*

    Is there anything I should verify on the EE side of the configuration?

    other steps so far
    1- verified all paths
    2- checked permissions chmod ‘ing to recommended 666 or 777 as appropriate

    fwiw I recently upgraded the server and continue to get “openbasedir” warnings in the CP
    (this may be unrelated and I am following up on config issue separately )

    Has anyone else gotten this to work?

    thanks!

  • #2 / Nov 29, 2011 8:53pm

    Sean C. Smith

    3818 posts

    Hi dreas,

    I think that your upload issue may be related to your open_basedir warnings. When using MSM you must have open_basedir restrictions between the different sites disabled. With the restrictions in place site2 will not be able to access site1 and several configurations will be wonky, which could include file upload paths and settings.

    I recommend getting the open_basedir restrictions fixed and then if your metaweblog API problem persists let us know and we can proceed further in investigating.

    Once you have that sorted let me know.

    Sean

  • #3 / Nov 29, 2011 9:14pm

    dreas

    61 posts

    Is there any reason I would be getting these open_basedir errors in EE v 2.x when they were not happening in v1.6.9?

    looking into getting those changes done

  • #4 / Dec 01, 2011 10:35am

    dreas

    61 posts

    Hi Sean,


    have had the server admin remove open_basedir restrictions.
    Took some grief for the request—I could almost see the sour look on his face. 8>

    I am working my way through the issue now moving from standard simple set up then towards MSM.  then adding Marsedit into equation last.

    However I can’t even get uploads to work properly through the CP File Manager on the default site.
    Despite the fact that uploads directory is set to 777 (apache as owner) I get this error:

    “The upload destination folder does not appear to be writable.”

    additional configuration notes

    File upload preferences uses absolute path. I’ve tried it both with and without a trailing slash “/”. same message

    *Plesk Server v 9*

  • #5 / Dec 01, 2011 11:14am

    dreas

    61 posts

    have rebuilt directories from scratch, given them correct permissions, then uploaded and reverified permissions and fixed

    upload working so far.

    Will be in touch once I get to MSM…

  • #6 / Dec 01, 2011 12:17pm

    dreas

    61 posts

    update:

    ok all good on upload from main site and via MarsEdit to main site.

    I’d like to keep each site’s files self contained so the site can be easily moved later.
    So I’ve set up an uploads folder within a

    however i get following on upload from CP:

    ———————-

    “A PHP Error was encountered
    Severity: Warning

    Message: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/thepath/site2.com/httpdocs/images/uploads/blog/book-142+6drop.jpg) is not within the allowed path(s): (/thepath/site/httpdocs:/tmp)

    Filename: libraries/Filemanager.php

    Line Number: 130

    The upload path does not appear to be valid.”

    ———————-


    I’m gonna assume that each of the sites needs to have open_basedir off in order for this to work…

  • #7 / Dec 01, 2011 12:25pm

    dreas

    61 posts

    oh one other quick tip for those doing this in future

    the _thumbs directory that gets generated by EE / PHP can be problematic as it’s permissions are wonky.
    The only way I could upload to work at all - even if i was not looking tot generate thumbs - was to create this folder beforehand and upload it to the site and set permissions to 777.

    _Only_ once this was in place were the uploads successful.

    Might be worth adding this to the comments in EE DOCS File Upload section

  • #8 / Dec 02, 2011 2:14pm

    dreas

    61 posts

    Got each part working
    upload √
    MSM open_basedir settings √
    upload to each site’s upload folder(s) √
    MarsEdit post upload and mass upload via MetaWeblog API√

    key stumbling blocks:
    open_basedir needs to be set on each site, not just default site for upload to work on each site
    uploads/name/ and uploads/name/_thumbs folders needs to be created ahead of time (on a Plesk 9.0 server at least) and given 777 permissions
    don’t forget to add a new or modify your existing MetaWeblogAPI config to reflect paths used.


    All ok—signing off

  • #9 / Dec 02, 2011 7:15pm

    Sean C. Smith

    3818 posts

    Dreas,

    Thanks for all the updates. I’m sure this will be helpful for others searching the forums in the future. I have had the same thumbnamil folder problem you mentioned before but only on one server. It may have been a server issue for you, but in anycase I’m glad you found the solution.

    Don’t hesitate to post again as needed.

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases