I am working on a web development project using laravel . I switched from Win8 to Win10 . But there is a problem, composer windows installer is not working(means the installer version is not supported for win10) on windows10 . So I get stucked . I tried(getcomposer.com sites ) windows manual installation procedure . But can not get it . Now what can i do?
Use your browser to download the latest PHAR: https://getcomposer.org/composer.phar
Drop it into your PHP folder and run: php composer.phar -V.
If you need a batch shortcut:
C:\where_your_PHP_lives>echo #php "%~dp0composer.phar" %*>composer.bat
and from there on just composer.bat...
Shameless plug:
You could also use a server stack for Windows, which ships PHP and Composer out-of-the-box, e.g. WPN-XM. Minimal package: WPNXM-0.8.6-Lite-Setup-php56-w64
Actually when i download composer-setup.exe from windows 10 . The file size is 40 kb but actuall size is 640kb . This is the cause of the error.
Related
How to install two composer in one windows system? (how to use difference composer in one windows system)
If you're using the windows installer only, IIRC you can't as it ships with the precondition to install under the canonical composer name.
However if you download the phar file, you just need to use the phar file of the version you would like to execute. This works independently to using the windows installer - both with and without it.
This has also the benefit that you can specify the PHP executable you would like to run composer.phar with.
c:\> c:\my\php.exe c:\my\composer-2.2.10.phar --version
This is basically what the Composer manual means where-ever it writes php composer.phar ....
You replace php with the PHP executable you would like to use and composer.phar with the composer phar you would like to use.
The windows setup installer is just installing the latest with the PHP version on your system under the canonical name composer. But instead you can create your own composer.bat.
You can then also create two such files for the different versions, e.g. composer-blue.bat and composer-red.bat.
This technique should be compatible to have next to composer with the windows setup installer, so you can use it to install one version you manage with the setup and zero up to N versions you manage yourself with the phar files.
Composer homepage lists all composer.phar files, see https://getcomposer.org/download/ and scroll down to "Manual Downloads" section.
A command-line utility like wget which also runs on Windows can greatly help you to streamline your process downloading the composer version of your choice under the file-name you'd like to have.
There is a Wikibook available on Windows Batch Scripting.
for window do the following steps:
one -> (create composer1 directory in C:\composer_path)
two -> (copy three file in composer directory to composer1 directory)
three -> (set path composer1 to environment variable)
four -> (run composer1 self-update --1 in cmd) because Convert to version 1.0.0
five -> (test versions composer)
and Done! ^_^
you can see two version of composer installed in one windows system.
i got this error when i'm trying to install composer for laravel framework :
"Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl"
i tried much but i don't know what should i do right now ?
i got win 8.1 , wamp 1.7 , php 5.4
open C:\wamp\bin\php\php5.4.12\php.ini & C:\wamp\bin\apache\Apache2.4.4\bin\php.ini
Find the line ;extension=php_openssl.dll and remove the semicolons ';'.
The line should look like extension=php_openssl.dll.
In Laravel documentation, it explained one short paragraph on how to use installer to install Laravel.
First, download the Laravel installer PHAR archive. For convenience, rename the file to laravel and move it to /usr/local/bin. Once installed, the simple laravel new command will create a fresh Laravel installation in the directory you specify. For instance, laravel new blog would create a directory named blog containing a fresh Laravel installation with all dependencies installed. This method of installation is much faster than installing via Composer.
I am a Windows 7 user. After download the laravel.phar file, where should I store the file? I don't think there is any /usr/local/bin directory on Windows 7. How can I get the laravel command to be able to use in command window?
Install laravel 5.2 via Laravel Installer in windows 7
Steps:
Please make sure you have installed composer into your computer
Open command prompt
$ composer global require “laravel/installer”
C:\xampp\htdocs> laravel new mylaravel
Youtube video guide:
http://www.pranms.com/how-to-install-laravel-5-2-via-laravel-installer-in-windows-7/
The laravel installer needs to be in your PATH (no matter which Operating system).
In Unix based systems, /usr/local/bin is in your PATH by default.
On Windows, you can add a folder to your PATH by doing like this:
Start the System Control Panel applet (Start - Settings - Control Panel - System).
Select the Advanced tab.
Click the Environment Variables button.
Under System Variables, select Path, then click Edit.
From http://windowsitpro.com/systems-management/how-can-i-add-new-folder-my-system-path
It's a lot easier to install using Composer. Download the Windows Composer installer from the Composer Website and run it. Once it's installed you can run from the command line:
composer create-project laravel/laravel your-project-name
This will create the folder your-project-name and install Laravel in it. The advantage of using Composer it that it makes adding other packages to Laravel really easy.
I am trying to install valitron (https://github.com/vlucas/valitron) on Windows 8 but it doesn´t seems to work. It uses Composer (http://getcomposer.org) for installation, but documentation is quite poor.
open the php shell console, than enter "cd path/to/your/htdocs/project". then you only have to enter the following: "php path/to/your/composer.phar require vlucas/valitron *". This should work, I have tested it with Xampp Local Server.
I don't have a shell or command line terminal to install composer.phar, what can I do? Is there any other way?
I had a similar situation with my hosting company. Even though I had an SSH access, the PHP installed in the SSH environment was 5.2.17 and I couldn't install composer. The web server itself had PHP 5.4 and I have managed to find a workaround and got Composer and Laravel 4 installed by running a PHP file on the web server.
For Laravel 4 to work, you need at least PHP 5.3 along with some required extensions, i.e. MCRYPT. You can check your PHP version and other related information via the phpinfo() function.
The PHP file I used to get Laravel installed is below. Copy composer.phar to your Laravel installation path.
<?php
putenv('COMPOSER_HOME=' . '/path/to/laravel');
$command = '/usr/local/php54/bin/php-cli /path/to/laravel/composer.phar install -d /path/to/laravel';
$output = system($command . ' 2>&1');
echo('<pre>' . $command . "\n" . $output);
?>
I had to use a full path for the php command line, because the default php was pointing to the old version, 5.2.17. Thus, you may not need the full path. If you do, adjust the path accordingly.
I hope that it helps.
You can just download composer.phar, put it in your application root (near the composer.json file) and then run :
php composer.phar install
On Windows there is also a composer.exe installer available.