Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error using PHPOpenCloud - OpenStack

I have installed OpenStack using DevStack script on single machine.

I want to make use of Swift services via OpenCloud SDK.

<?php
require_once 'vendor/autoload.php';
use OpenCloud\OpenStack;

$client = new OpenStack('http://192.168.171.131:8080/v1/AUTH_93c5fe7a60b64f2f81560999d5f63861', array(
    'username' => 'admin',
    'password' => 'devstack',
    'tenant' => 'admin'));
$region = 'RegionOne';
$objectStoreService = 
$client->objectStoreService('swift', $region,'publicURL');
?>

And getting error.

Fatal error: Uncaught exception 'Guzzle\Http\Exception\ClientErrorResponseException'
with message 'Client error response [status code] 
401 [reason phrase] Unauthorized [url]
http://192.168.171.131:8080/v1/AUTH_93c5fe7a60b64f2f81560999d5f63861/tokens

Some one said it is only for RackSpace cloud. True? Or I can use PHPOpenCloud for my locally deployed OpenStack cloud?

Error using PHPOpenCloud - OpenStack

I have installed OpenStack using DevStack script on single machine.

I want to make use of Swift services via OpenCloud SDK.

<?php
require_once 'vendor/autoload.php';
use OpenCloud\OpenStack;

$client = new OpenStack('http://192.168.171.131:8080/v1/AUTH_93c5fe7a60b64f2f81560999d5f63861', array(
     'username' => 'admin',
     'password' => 'devstack',
     'tenant' => 'admin'));
$region = 'RegionOne';
   try{
     $objectStoreService = 
$client->objectStoreService('swift', $region,'publicURL');
     $client->objectStoreService('swift','RegionOne','publicURL'); 
     } 
     catch (Guzzle\Http\Exception\ClientErrorResponseException $e) {
     echo $e->getResponse(); 
     }
?>

And getting error.

Fatal error: Uncaught exception 'Guzzle\Http\Exception\ClientErrorResponseException'
with message 'Client error response [status code] 
401 [reason phrase] Unauthorized [url]
http://192.168.171.131:8080/v1/AUTH_93c5fe7a60b64f2f81560999d5f63861/tokens
as shown in below image.

http://i.stack.imgur.com/UKLOm.jpg

Some one said it is only for RackSpace cloud. True? Or I can use PHPOpenCloud for my locally deployed OpenStack cloud?