开发者

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-rackspac开发者_如何学Goe.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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜