Codemonkey
Codemonkey

Reputation: 709

Problem connecting to Rackspace Cloud Files in the UK

Any idea why the following code

$auth = new CF_Authentication(USERNAME, API_KEY, NULL, UK_AUTHURL);

is giving me

PHP Fatal error: Uncaught exception 'InvalidResponseException' with message 'Unexpected response (): ' in /var/www/sites/mysite/http/inc/rackspace/cloudfiles.php:212 Stack trace: 0 /var/www/sites/mysite/http//test-rackspace.html(17): CF_Authentication->authenticate() 1 {main} thrown in /var/www/sites/mysite/http/inc/rackspace/cloudfiles.php on line 212 ?

Previously I was erroneously trying to connect to the US server using the following:

$auth = new CF_Authentication(USERNAME, API_KEY);

which was giving me:

PHP Fatal error: Uncaught exception 'AuthenticationException' with message 'Invalid username or access key.' in /var/www/sites/mysite/http/inc/rackspace/cloudfiles.php:209 Stack trace: 0 /var/www/sites/mysite/http/test-rackspace.html(17): CF_Authentication->authenticate() 1 {main} thrown in /var/www/sites/mysite/http/inc/rackspace/cloudfiles.php on line 209

I've tried 1.7.9 / 1.7.8 / 1.7.6 versions of the code. None makes any difference.

Any help massively appreciated, tearing my hair out here!

Upvotes: 1

Views: 1072

Answers (1)

JCallicoat
JCallicoat

Reputation: 117

I'm not able to replicate this issue here. The following prints a list of containers on my UK Files account.

$auth = new CF_Authentication($username, $api_key, NULL, UK_AUTHURL);
$auth->authenticate();
$conn = new CF_Connection($auth);
print_r($conn->list_containers());

You should probably open a support ticket with Rackspace if you're still having trouble.

Upvotes: 1

Related Questions