I am having problems trying to get the Rackspace Opencloud API to work as expected (particularly the cloud files).
I have been following these guides:
https://github.com/rackspace/php-opencloud/blob/master/docs/userguide/ObjectStore/Access.md http://docs.rackspace.com/sdks/api/php/namespace-OpenCloud.ObjectStore.html
The Authentication seems to work fine because a token and the service catalog is returned.
header("Content-Type: text/plain");
require '/vendor/autoload.php';
use OpenCloud\Rackspace;
$client = new Rackspace('https://lon.identity.api.rackspacecloud.com/v2.0/', array(
'username' => 'MY_USERNAME',
'apiKey' => 'MY_APIKEY'
));
$client->authenticate();
echo 'Authenticated with token: '.$client->getToken()."\n\n";
print_r($client->getCatalog());
My problems start when i try to use a service from the API:
$service = $client->objectStoreService('cloudFiles');
This line kills the code. I have copied the Rackspace documentation line for line but still no luck, I am unable to get any of the services to work.
Can anyone see where I'm going wrong or provide any tips for the best way to troubleshoot this issue?