•  0
    PHP

    How to install PHP library(Dependencies) in windows wamp server using Composer

      Admin     6853        0        Report content

    How to install PHP library(Dependencies) in windows wamp server using Composer

    1. Download composer here: https://getcomposer.org/download/

    2. Choose the Windows Installer

    3. After download, run the installer and follow the instructions. Make sure you already have php installed in your server. By the way, this is installed by default when you install Wamp server. :-)

    4. Create your project folder inside your Wamp server directory. eg: “C:wampwwwMyWebsite”

    5. Inside your root project folder, create file “composer.json”. Composer will refer to this file when installing PHP library (Dependencies)

    6. Let install this dependencies : “Amazon-Product-Adverstising-API library based on PHP using REST and SOAP”

    7. Inside the composer.json file, put the following code:

    {   “require”: {
          “exeu/apai-io”: “dev-master”
      }
    }

    8. Open Command Console, execute the following code:

    C:>composer install -d C:wampwwwMyWebsite

    9. To make this work, you must have PHP extension curl enabled

    10. Another way around is download the composer.pahr using the manual download option in https://getcomposer.org/download/

    11. Copy composer.pahr file and put inside your php folder eg: C:wampinphpphp5.3.10

    12. Open Command Console, navigate to the php folder as shown below

    C:wampinphpphp5.3.10>

    13. Enter the following command

    C:wampinphpphp5.3.10>php.exe composer.phar install -d C:wampwwwMyWebsite

    14. Please note that this option also require PHP extension curl enabled

    15. If you encounter this error “PHP extension curl is missing”, you must enable this extension by uncomment the extension in php.ini

    16. The php.ini file is the file inside the wamp/bin/PHP folder not inside the wamp/bin/apache folder

    17. The openssl extension also need to enabled. The required PHP extensions for using composer as follow:

    extension=php_curl.dll
    extension=php_openssl.dll

     


  •  


Leave a Comment

Please Login to insert comment.

 

Facebook Conversations