将php云文件与swift openstack一起使用时出现内部服务器错误

将php云文件与swift openstack一起使用时出现内部服务器错误,php,cloudfiles,openstack,openstack-swift,Php,Cloudfiles,Openstack,Openstack Swift,我目前正在使用php文件作为swift的API,安装在带有tempauth的SAIO上。 执行php文件: require('cloudfiles.php'); $username="test:teste"; $api_key="AUTH_tkfec9a726c0584d3d8f0150eb36446fd4"; $auth = new CF_Authentication($username, $api_key); $auth->authenticate(); if ( $aut

我目前正在使用php文件作为swift的API,安装在带有tempauth的SAIO上。 执行php文件:

 require('cloudfiles.php');
 $username="test:teste";
 $api_key="AUTH_tkfec9a726c0584d3d8f0150eb36446fd4";
 $auth = new CF_Authentication($username, $api_key);
 $auth->authenticate();
 if ( $auth->authenticated() )
     echo "CF Authentication successful \n";
 else
     echo "Authentication faile \n";
由于某些身份验证问题,执行不起作用:

PHP致命错误:未捕获异常“AuthenticationException”,消息为“无效用户名或访问密钥”


用户名和api_密钥已更正(使用swift命令进行测试,我可以在swift上的容器上进行操作?我想知道它在进行身份验证时是如何工作的?有什么想法吗?

您没有提供身份验证主机URL,因此默认值为。这可能是问题所在

顺便说一句,您应该将函数包装在
try-catch
块中

echo "Authentication faile \n";
将永远不会被调用,因为
authenticate()
如果不引发异常,则始终返回true