We moved to Acquia Cloud hosting and now can't run a feeds import. The remote enclosure are mistakenly considered local files.

File http://www.123.biz/mas_assets/full/r71.jpg (/mnt/www/html/123/docroot/http://www.123.biz/mas_assets/full/r71.jpg) could not be copied because it does not exist.

As you can see, the realpath is not http://, but /mnt/www/...

How can this happen? How to fix it?

Comments

bjaspan’s picture

On Acquia Cloud, /var/www/html//docroot is your Apache docroot. However, I cannot find a site named "123" nor any site with the domain name "www.123.biz", so I don't know what your Cloud sitename is. This makes me think that /mnt/www/html/123/docroot is somehow a path resolved in PHP from a relative path including some "../"'s, and I don't see any way that having the "http://" part of the "path" added could come from anywhere other than PHP.

If you find a reason to believe the problem is caused by Acquia Cloud, by all means submit a support ticket.

Anonymous’s picture

I had obscured the actual domain "thakafa" with "123". Trying to fetch that image from www.andalusiah.com hosted on Acquia. Thakafa.biz is the remote site and it is not on Acquia.

What I think happens: PHP regards "http://etc." to be a local filename, instead of recognizing it as a remote URI. In Feeds' getFile() it should do a file_save_data(), but instead does a local file_copy().

Anonymous’s picture

I think this is where it goes awry - in getFile() in FeedsParser.inc:

// Copy or save file depending on whether it is remote or local.
      if (drupal_realpath($this->getValue())) {
  # does a local file_copy()
  }
  else {
  # does a remote file_save_data()
}

On Acquia hosting drupal_realpath() thinks that http://www.thakafa.biz/mas_assets/full/r71.jpg is a local file (we are fetching from www.andalusiah.com on Acquia; Thakafa.biz is a remote site not on Acquia).

I can temporarily fix this for my case, by forcing the right action, so I'm fine now. But if I'm right about drupal_realpath() then Acquia hosting has a critical issue!

webkenny’s picture

Status: Active » Closed (won't fix)

This is related to an operating system level bug with the version of PHP we utilize and Ubuntu 8.04 which causes resolution on certain paths to not work properly. We are aware of the bug (thanks to @morningtime for his additional info!) and it is now prioritized as one we need to handle sooner than later.

-Kenny @ Acquia

Anonymous’s picture

Thanks for everything, Kenny. You guys are the best.

patcon’s picture

Hey webkenny, can you specify the recommended fix for those following along at home. We're acquia customers, and running into this on our own integration servers (which are running ubuntu hardy 8.04 like you guys). Sounds like you resolved it on your servers, but it might also be helpful to post the resolution publicly for anyone else using hardy.

I suspect we'll need to file a ticket with you guys to get that info, but just wanted to post here as well :)

webkenny’s picture

Sounds like one of our guys is already aware of the problem but it's still something we are addressing in a future sprint version. The fix lies in whatever code is calling your action. Sadly the only way to fix this at an OS level is to upgrade the version of PHP being run either through a custom build or by upgrading the OS itself. I'll relay this to our support engineer and see if maybe we can come up with a specific fix for your use case.

DamienMcKenna’s picture

FYI you can ask Acquia to migrate your site to a newer PHP 5.3 server, it's worth a try.

webkenny’s picture

Status: Closed (won't fix) » Closed (fixed)

Acquia now provides support for Ubuntu Lucid Lynx 10.04 with as Damien points out, support for PHP 5.3 - This problem is no longer an issue for those user. Simply file a support ticket with us (regardless of your subscription level) and we can get you upgraded.

** Kenny Silanskas | Support Team Manager, Tier 1 - Acquia | @webkenny