Rackspace CloudFiles PHP Binding error copying files

I’ve recently evaluated some CDN services and Rackspace CloudFiles, and its Akamai integration, have arisen as one of the most interesting services. This was mainly because Rackspace have the CORS headers as part of its service (something that CloudFront still does not have… what are you waiting for guys?) and because the response times are extremely low (I don’t have any measurement yet but I have the feeling that latency was significantly lower with CloudFiles).

But I’m not going to describe the service that Rackspace can offer as CDN, I maybe will do it in the future but not today. Today I’m going to describe how to fix a problem with the PHP CloudFiles API binding.

When working with the UK endpoint, you cannot use the copy_object_to and the move_object_to functions of the CFObject class because these ones are broken.

In odred to make the PHP binding working again you should only search for the lines below in the cloudfiles_http.php file:

$url_path = $this->_make_path(“STORAGE”, $container_name_source, rawurlencode($src_obj_name));
$destination = rawurlencode($container_name_target.”/”.$dest_obj_name);

And replace them with the next ones:

$url_path = $this->_make_path(“STORAGE”, $container_name_source, $src_obj_name);
$destination = $container_name_target.”/”.$dest_obj_name;

I don’t know why but, these lines are the last updates that the project received (six months ago or so), and reverting them, functions mentioned above were brought back to life.


2 thoughts on “Rackspace CloudFiles PHP Binding error copying files”

    1. CloudBerry looks promising but it would be nice to see a Linux version. I’m currently working only on Linux platforms and it’s impossible to find a client for that platform. I think that a lot of companies working with CloudFiles would pay for it.
      Furthermore, there is a little confusion about the UK endpoint and the US one in some clients but it’s a different issue ;-)

Comments are closed.