locked
Error connecting to my account at the Azure storage using PHP RRS feed

  • Question

  • Dear Sirs,

    I'm having a problem when I was creating the connection with my azure storage account. When I running the following line the program stopped processing:

    $ BlobRestProxy = ServicesBuilder :: getInstance () -> createBlobService ($ connectionString);

    So I accessed the error log file that is in the LogFiles / php_errors.log and it showed me the following error:

    [16-Mar-2015 12:18:33 America / Los_Angeles] PHP Warning: require_once (HTTP / Request2.php): failed to open stream: No such file or directory in D: \ home \ site \ wwwroot \ azure-sdk -for-php-master \ WindowsAzure \ Common \ Internal \ Http \ HttpClient.php on line 33

    [16-Mar-2015 12:18:33 America / Los_Angeles] PHP Fatal error: require_once (): Failed opening required 'HTTP / Request2.php' (include_path = '; C: \ php. \ Pear') in D: \ home \ site \ wwwroot \ azure-sdk-for-php-master \ WindowsAzure \ Common \ Internal \ Http \ HttpClient.php on line 33

    I opened the file HttpClient.php on line 33 and there was the following code:

    require_once 'HTTP / Request2.php';

    When I checked in que Http folder there was no "Request2.php" file where.

    So I accessed the Azure SDK for PHP on Github in https://github.com/Azure/azure-sdk-for-php address and found the folder and there was also no "Request2.php" there.

    Where can I find this file?
    Will I need to install something else?
    Is there any article that can help me solve this problem?

    Regards,

    Pedro Gustavo Duarte
    Tuesday, March 24, 2015 2:20 PM

Answers

All replies

  • Hi Pedro,

    As the PHP Client Libraries for Microsoft Azure have a dependency on http_request2, to resolve the dependency issue have you installed PEAR package manager and installed the dependencies using the manager?

    You could use the following link to install PEAR Package Manager:

    http://pear.php.net/manual/en/installation.php

    and the following link to install http_request2:

    http://pear.php.net/package/HTTP_Request2

    Mail_mime: http://pear.php.net/package/Mail_mime

    Mail_mimeDecode: http://pear.php.net/package/Mail_mimeDecode

    Hope this is helpful.

    Regards,Malar.

    Tuesday, March 24, 2015 3:47 PM
  • Dear Malar,

    I already have pear installed on my computer with the XAMPP.

    When I run my application through Apache (is within the XAMPP) my application works correctly.

    But when I run my web application through the Azure website, it does not work because I do not have HTTP_Request2, Mail_Mime and Mail_mimeDecode packages in my project.

    I tried to install the packages using the links above but did not succeed.

    You would have any article that could help me install the dependencies of the SDK, so that when I transfer the files to the server to be there all the packages needed for my application work properly?

    Regards,

    Pedro Gustavo Duarte

    Friday, March 27, 2015 1:35 PM
  • Dear Malar,

    I do not have much knowledge in CMD commands.

    Whenever I try to install the packages using the command "pear install http_request2" or "pear install channel: //pear.php.net/http_request2-0.5.2" the following error appears:

    'pear' is not recognized as an internal or external command, operable program or file in lotus.

    I have some doubts about the PEAR.

    How would the folder structure? Would be added to the packages inside the Azure SDK? Would be in the root folder of the system? I need to move on some of my Azure website setup?

    What causes the error mentioned above in my command prompt with that in my folder 'php' there is a file in lotus 'pear'?

    Thanks & Regards,

    Pedro Gustavo Duarte

    Friday, March 27, 2015 7:39 PM