How to install composer under Phpstudy under Windows

Source: Internet
Author: User
Title Phpstudy can let me switch the environment convenient also some one key function is very good, now such as selected nigix+php5.3
How do I install composer?
Is it possible to resolve settings for environment variables?

Reply content:

Title Phpstudy can let me switch the environment convenient also some one key function is very good, now such as selected nigix+php5.3
How do I install composer?
Is it possible to resolve settings for environment variables?

Well, I've already done it, so let's share my experience here. In fact, the most in the installation process of the father should be the download of the composer.phar file, should be the problem of the network, the title of the main you can gfw try the effect, but I do not have here. Because of the network problem, so I gave up using EXE to install that super-convenient method, so I was manually operated.

First of all you have to set the environment variables of PHP, but there is no setting is not very related to ensure that the command line can run PHP.

Then check if the OpenSSL plugin is installed.

The PHP command line configuration file and the usual configuration file (corresponding to the Web site) is not a file control, so you may php.ini the file with the OpenSSL plugin but it is likely that the command line or prompt you do not load (this is also the error I made before).

It is recommended that you install it first Git Bash , so you can use the Linux command in CMD. Then run php -i | grep openssl to see if there is any return, if any, it is indeed open. If it does not Git Bash matter, CMD has its own command php -i | findstr openssl can be used, thanks to @Deloz great friendship reminders.

If not, please take a php -i | grep php.ini look at where the configuration file is (also can be replaced php -i | findstr php.ini ), I show here C:\Windows . But the more depressed is in the folder I did not find a php.ini file, and then I searched for the discovery as long as we use the usual php.ini copy here, and then modify the address of the file extension_dir to the specific address to be good.

Now we can run php -i | grep openssl or php -i | findstr openssl check the general discovery.

Then run the code below to download the installation file: curl -sS https://getcomposer.org/installer | php -- --version=1.0.0-alpha8 --filename=composer .

I have previously installed separately Curl so run the curl command without pressure, if not, curl direct access to https://getcomposer.org/installer this address replication is not a problem, such as your saved file name composer_install.php , then you need to run next php composer_install.php --version=1.0.0-alpha8 --filename=composer .

It's a good idea --version to specify this parameter, because I didn't specify the download or failed (the pit-daddy network). Wait a little longer should be good (I am here), so composer even download it.

Run the word is also simple, to the composer.json current path to run php composer_dir install just fine, where the composer_dir corresponding amount is the address of your composer file.

I do not have Composer windows, now I do not have windows, although not phpstudy, but Composer is a PHP-dependent command-line tool, so it is not related to Nginx and others. It is only related to PHP and the system.

How to install Composer on Windows, the official website has been written very clearly, specifically:
Https://getcomposer.org/doc/00-intro.md#installation-windows

Official website +1, there is also a method of comparison of soil, suitable for Cygwin under the use of composer, the direct download of Composer.phar is not configured with global variables:

You can copy the Composer.phar to the appropriate project directory, such as the root directory of each Symfony project, alongside Composer.json. Then use the appropriate

{path}/php Composer.phar xxx

Related references

For this reason, you do not have to open PHP's OpenSSL extension, open it in Phpstudy, and then install it.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.