Answered by:
How to upload 100 Mb+ video on Azure storage using PHP

Question
-
Dear Sirs,
I have uploaded 1.2 Mb video to Azure storage through PHP code with no problem. When I tried to upload a 90 Mb video I got the following error message:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 90363852 bytes) in C:\xampp\htdocs\projetos\ajao\azure-sdk-for-php-master\WindowsAzure\Blob\BlobRestProxy.php on line 1319
Can somebody please instruct me how to upload 100 Mb+ file size into Azure storage using PHP code?
In advance thanks for your help.
Best regards,
Luiz Doi
Friday, February 6, 2015 4:33 PM
Answers
-
Hi LYDoi,
Did you take a look at the Getting Started documentation for PHP, on Azure Storage? Here's a link: http://azure.microsoft.com/en-us/documentation/articles/storage-php-how-to-use-blobs/#UploadBlob
- Marked as answer by Will ShaoMicrosoft employee Sunday, February 15, 2015 8:24 AM
Friday, February 6, 2015 4:50 PM -
Hi,
Hope this link might help you:
http://cloud.dzone.com/articles/uuploading-large-file
Regards,
Manu Rekhar
- Marked as answer by Will ShaoMicrosoft employee Sunday, February 15, 2015 8:24 AM
Tuesday, February 10, 2015 11:35 AM
All replies
-
Hi LYDoi,
Did you take a look at the Getting Started documentation for PHP, on Azure Storage? Here's a link: http://azure.microsoft.com/en-us/documentation/articles/storage-php-how-to-use-blobs/#UploadBlob
- Marked as answer by Will ShaoMicrosoft employee Sunday, February 15, 2015 8:24 AM
Friday, February 6, 2015 4:50 PM -
Hi Alex,
Yes, I have already used the above link to upload images and videos into Azure storage using PHP. Everything worked well except for the video file size I mentioned above.
I have checked MSDN and Stack overflow forums. I have found some answers but all of them are for .NET, not for PHP. The instruction is to upload large video size in 4Mb blocks up to 10K per blobs but the instruction is only for .NET.
We are looking for a solution using PHP.
Thanks & regards,
Luiz Doi
Friday, February 6, 2015 6:18 PM -
Hi,
Hope this link might help you:
http://cloud.dzone.com/articles/uuploading-large-file
Regards,
Manu Rekhar
- Marked as answer by Will ShaoMicrosoft employee Sunday, February 15, 2015 8:24 AM
Tuesday, February 10, 2015 11:35 AM -
Hi Manu, Im having the same problem as Luiz, getting the same type of errors. I'm not a dev so I thought I ask for more details to clear things out.
I have a Joomla site that was configured in though Azure hosting but I can't upload anything into Joomla less than 8MB. So basically having Azure storage blobs and media services for Joomla is useless if I can't use the larger files into the site or out of the site into Azure storage/Media services acct.
I even manually changed the upload_max_filesize and post_max_size parameters on the admin and then directly on the site code and even added a php.ini file on the root to override all as I read here but still nothing worked.
Therefore the code you posted above seems the solution but just wanted to be sure if it will solve my issue.
1. I need my Azure hosted site to allow larger files up to 500MB.
2. I need the files people upload on my site front end through a form see here to be sent to my Azure blob. What code do I need to paste on the Joomla's forms admn. So basically files first go into site and then to storage.
3. After I upload the Php SDk and then the Http_Request2 PEAR and paste your code in the SDK how does the code recognize my Azure site and my azure blob/containers? Where in the code do I plug in my info?
Kindly advise.
Karin
kd9000
- Proposed as answer by kd9000 Tuesday, April 7, 2015 5:01 AM
Tuesday, April 7, 2015 5:00 AM