You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 8, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+48-28Lines changed: 48 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
-
# Microsoft Azure Storage PHP Client Libraries
1
+
# Microsoft Azure Storage PHP Client Libraries (Deprecated)
2
2
3
-
This project will be in Community Support and Azure Storage team commits to validate and release every quarter, as long as there are PRs from community. Azure Storage team is unable to continue to add new features or provide bugfixes.
3
+
This project will be in [Community Support](https://azure.github.io/azure-sdk/policies_support.html#package-lifecycle) until 17 March 2024. After this date the project and associated client libraries will be retired permanently. For more details on the retirement and alternatives to using this project, visit [Retirement notice: The Azure Storage PHP client libraries will be retired on 17 March 2024](https://aka.ms/AzStoragePHPSDKRetirement).
4
+
5
+
---
4
6
5
7
This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage services (blobs, tables, queues and files). For documentation on how to host PHP applications on Microsoft Azure, please see the [Microsoft Azure PHP Developer Center](http://www.windowsazure.com/en-us/develop/php/).
6
8
@@ -12,10 +14,10 @@ This project provides a set of PHP client libraries that make it easy to access
12
14
13
15
> **Note**
14
16
>
15
-
> * If you are looking for the Service Bus, Service Runtime, Service Management or Media Services libraries, please visit https://github.com/Azure/azure-sdk-for-php.
17
+
> * If you are looking for the Service Bus, Service Runtime, Service Management or Media Services libraries, please visit [Azure SDK for PHP](https://github.com/Azure/azure-sdk-for-php).
16
18
> * If you need big file (larger than 2GB) or 64-bit integer support, please install PHP 7 64-bit version.
17
19
18
-
# Features
20
+
##Features
19
21
20
22
* Blobs
21
23
* create, list, and delete containers, work with container metadata and permissions, list blobs in container
@@ -34,7 +36,6 @@ This project provides a set of PHP client libraries that make it easy to access
34
36
35
37
Please check details on [API reference documents](http://azure.github.io/azure-storage-php).
1. Create a file named **composer.json** in the root of your project and add the following code to it:
64
+
63
65
```json
64
66
{
65
67
"require": {
@@ -70,11 +72,12 @@ cd ./azure-storage-php
70
72
}
71
73
}
72
74
```
73
-
2. Download **[composer.phar](http://getcomposer.org/composer.phar)** in your project root.
74
75
75
-
3. Open a command prompt and execute this in your project root
76
+
1. Download **[composer.phar](http://getcomposer.org/composer.phar)**in your project root.
76
77
77
-
```
78
+
1. Open a command prompt and execute this in your project root
79
+
80
+
```shell
78
81
php composer.phar install
79
82
```
80
83
@@ -102,23 +105,24 @@ use MicrosoftAzure\Storage\Blob\BlobRestProxy;
102
105
use MicrosoftAzure\Storage\Common\ServiceException;
103
106
```
104
107
105
-
* To instantiate the service client you will also need a valid [connection string](https://azure.microsoft.com/en-us/documentation/articles/storage-configure-connection-string/). The format is:
108
+
* To instantiate the service client you will also need a valid [connection string](https://azure.microsoft.com/en-us/documentation/articles/storage-configure-connection-string/). The format is:
Following errors are not retried in current retry middleware:
197
-
- Authentication failures.
198
-
- "Resource Not Found" errors.
199
-
- Guzzle request exceptions that does not bear an HTTP response, e.g. failed to open stream, or cURL Connection reset by peer, etc.
208
+
209
+
* Authentication failures.
210
+
* "Resource Not Found" errors.
211
+
* Guzzle request exceptions that does not bear an HTTP response, e.g. failed to open stream, or cURL Connection reset by peer, etc.
200
212
*Note:* Community contribution to cover the Guzzle request exceptions are welcomed.
201
213
202
-
#### Retry types
203
-
-`RetryMiddlewareFactory::GENERAL_RETRY_TYPE` - General type of logic that handles retry
204
-
-`RetryMiddlewareFactory::APPEND_BLOB_RETRY_TYPE` - For the append blob retry only, currently the same as the general type
214
+
### Retry types
215
+
216
+
*`RetryMiddlewareFactory::GENERAL_RETRY_TYPE` - General type of logic that handles retry
217
+
*`RetryMiddlewareFactory::APPEND_BLOB_RETRY_TYPE` * For the append blob retry only, currently the same as the general type
205
218
206
-
#### Interval accumulations
207
-
-`RetryMiddlewareFactory::LINEAR_INTERVAL_ACCUMULATION` - The interval will be increased linearly, the *nth* retry will have a wait time equal to *n * interval*
208
-
-`RetryMiddlewareFactory::EXPONENTIAL_INTERVAL_ACCUMULATION` - The interval will be increased exponentially, the *nth* retry will have a wait time equal to *pow(2, n) * interval*
219
+
### Interval accumulations
220
+
221
+
*`RetryMiddlewareFactory::LINEAR_INTERVAL_ACCUMULATION` - The interval will be increased linearly, the *nth* retry will have a wait time equal to *n \* interval*
222
+
*`RetryMiddlewareFactory::EXPONENTIAL_INTERVAL_ACCUMULATION` - The interval will be increased exponentially, the *nth* retry will have a wait time equal to *pow(2, n) \* interval*
209
223
210
224
### Using proxies
225
+
211
226
To use proxies during HTTP requests, set system variable `HTTP_PROXY` and the proxy will be used.
212
227
213
228
## Troubleshooting
229
+
214
230
### Error: Unable to get local issuer certificate
231
+
215
232
cURL can't verify the validity of Microsoft certificate when trying to issue a request call to Azure Storage Services. You must configure cURL to use a certificate when issuing https requests by the following steps:
216
233
217
-
1. Download the cacert.pem file from [cURL site](http://curl.haxx.se/docs/caextract.html).
234
+
1. Download the cacert.pem file from [cURL site](http://curl.haxx.se/docs/caextract.html).
218
235
219
236
2. Then either:
220
237
* Open your php.ini file and add the following line:
238
+
221
239
```ini
222
240
curl.cainfo = "<absolute path to cacert.pem>"
223
241
```
242
+
224
243
OR
225
244
* Point to the cacert in the options when creating the Relevant Proxy.
245
+
226
246
```php
227
247
//example of creating the FileRestProxy
228
248
$options["http"] = ["verify" => "<absolute path to cacert.pem>"];
@@ -233,19 +253,19 @@ cURL can't verify the validity of Microsoft certificate when trying to issue a r
233
253
234
254
You can find samples in the [samples folder](https://github.com/Azure/azure-storage-php/tree/master/samples).
235
255
236
-
# Migrate from [Azure SDK for PHP](https://github.com/Azure/azure-sdk-for-php/)
256
+
## Migrate from [Azure SDK for PHP](https://github.com/Azure/azure-sdk-for-php/)
237
257
238
258
If you are using [Azure SDK for PHP](https://github.com/Azure/azure-sdk-for-php/) to access Azure Storage Service, we highly recommend you to migrate to this SDK for faster issue resolution and quicker feature implementation. We are working on supporting the latest service features as well as improvement on existing APIs.
239
259
240
260
For now, Microsoft Azure Storage PHP client libraries share almost the same interface as the storage blobs, tables, queues and files APIs in Azure SDK for PHP. However, there are some minor breaking changes need to be addressed during your migration. You can find the details in [BreakingChanges.md](BreakingChanges.md).
241
261
242
-
# Need Help?
262
+
## Need Help?
243
263
244
-
Be sure to check out the Microsoft Azure [Developer Forums on Stack Overflow](http://go.microsoft.com/fwlink/?LinkId=234489) and [github issues](https://github.com/Azure/azure-storage-php/issues) if you have trouble with the provided code.
264
+
Be sure to check out the Microsoft Azure [Developer Forums on Stack Overflow](http://go.microsoft.com/fwlink/?LinkId=234489) and [github issues](https://github.com/Azure/azure-storage-php/issues) if you have trouble with the provided code.
245
265
246
266
Please note this project will be in Community Support and Azure Storage team commits to validate and release every quarter, as long as there are PRs from community. Azure Storage team is unable to continue to add new features or provide bugfixes.
247
267
248
-
# Contribute Code or Provide Feedback
268
+
## Contribute Code or Provide Feedback
249
269
250
270
If you would like to become an active contributor to this project please follow the instructions provided in [Azure Projects Contribution Guidelines](https://opensource.microsoft.com/program/#program-contributing).
251
271
You can find more details for contributing in the [CONTRIBUTING.md](CONTRIBUTING.md).
0 commit comments