phpjsonshellcurlomnipay

How to run $curl in xampp shell?


There is a plugin that need to config the composer

First , I need to run:

https://github.com/thephpleague/omnipay

composer require omnipay/paypal:~2.0

So, I have type in the above command in xampp shell, it works, and a composer.json , vendor folder is created in xampp root folder.

The first step is success. Second, I need to config

https://github.com/lokielse/omnipay-alipay

I have edit the composer.json to :

{
    "require": {
        "lokielse/omnipay-alipay": "dev-master"
    }
}

But the problem is it seems I can not run the below command in xampp shell. It just show $ is not a command. So, how can I execute it? Thanks a lot

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

Solution

  • If the first command is working successfully, then it means that your composer works fine by using the command composer which usually is a simplification of php composer.phar. Also the commands curl -s http://getcomposer.org/installer | php are needed to install composer but you clearly have it already installed.

    Summarising, do not run these commands:

    curl -s http://getcomposer.org/installer | php
    php composer.phar update
    

    Instead run this:

    composer update