2011-04-07 46 views
1

任何想法,为什么下面的代码问题连接到Rackspace的云文件在英国

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

是给我

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

以前我被错误地尝试使用连接到美国服务器如下:

$auth = new CF_Authentication(USERNAME, API_KEY);

这是给我:

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

我试过1.7.9/1.7.8/1.7.6版本的代码。没有任何区别。

任何帮助大量赞赏,撕裂我的头发在这里!

回答

1

我无法在这里复制此问题。以下列出了我的英国文件帐户上的容器列表。

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

如果您仍然遇到问题,您应该使用Rackspace打开支持凭单。