Error During Uploading Image into Blob Storage

Jun 12, 2010 at 12:07 PM
Edited Jun 13, 2010 at 11:33 AM

 

I am getting a new error during uploading image into my blob storage after setting proxy.

Current Code :

<?php

include ("C://xampp/htdocs/azure/Microsoft/WindowsAzure/Storage/Blob.php");


// Connect to Windows Azure cloud storage


$sto = 'blob.core.windows.net';

$acc = 'xxxxxxxxxxxxxx';

$key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx';

//$key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';


$storageClient = new Microsoft_WindowsAzure_Storage_Blob($sto,$acc,$key);

$storageClient->setProxy(true,'xxxxxxxxxxxx',80);

echo " after client creation :  " . (bool)$storageClient;

$localpath = 'C:\xampp\htdocs\azure\image\Winter.jpg';

$result = $storageClient->putBlob('album', 'aa.jpg', $localpath);

?>

 

Error :

" Fatal error: Uncaught exception 'Microsoft_WindowsAzure_Exception' with message 'Resource could not be accessed.' in C:\xampp\htdocs\azure\Microsoft\WindowsAzure\Storage\Blob.php:613 Stack trace: #0 C:\xampp\htdocs\azure\Test1.PHP(26): Microsoft_WindowsAzure_Storage_Blob->putBlob('album', 'aa.jpg', 'C:\xampp\htdocs...') #1 {main} thrown in C:\xampp\htdocs\azure\Microsoft\WindowsAzure\Storage\Blob.php on line 613 "

Please give me solution.

Coordinator
Jun 14, 2010 at 7:35 AM

Did you create the container album?
Are proxy settings OK? Including credentials?

Jun 15, 2010 at 6:26 AM

 

Thanks.

Ya. There was some problem in proxy setting. Without proxy its working fine. But when I am trying to do it in prxy envirnoment, its giving this error. If you will have any other solutions, then please let me know.

Coordinator
Jun 15, 2010 at 7:44 AM

Is authentication for the proxy required? If so, add user:pass@proxy.domain:8080 as the proxy address.

Jun 15, 2010 at 8:09 AM

Ya its required. You just check the code which I posted above. I set proxy, but after setting proxy still its giving the error which I have mentioned above.