Laravel 4.2 install on windows - php

I want to install Laravel 4.2 installation some packages via Composer. However, I am getting an error
“failed to clone git#github.com:symphony/Translation.git.git was not found. Check that it is installed in your path env. ‘git’ is not recognized as an internal or external command”
I want to use version 4.2.0 which is an older version of laravel. I’m successful to download if I do not mention version number but not when I include version number.
I tried:
C:\xampp\htdocs\laravel composer create-project laravel/laravel newapp 4.2 –prefer-dist
Or
C:\xampp\htdocs\laravel composer create-project laravel/laravel newapp –prefer-dist 4.2.0
Or
C:\xampp\htdocs\laravel composer create-project laravel/laravel newapp –prefer-dist 4.2.*
Or
C:\xampp\htdocs\laravel composer create-project laravel/laravel {{newapp}} 4.2.* –prefer-dist *
All with same error...
What do I need to make it work? Do I need to install git but How? i have no idea thanks for your help.
Note:I have latest composer downloaded yesterday July 24

Why do you want to use an old and not updated version of Laravel?
The first one is the correct way to install Laravel with composer/create-project.
Can you try to clone the laravel/laravel repository and to run composer udpate?

Lynda was a good source of information for me to learn Laravel(4.2) and if I recall there was a course that went into detail on installing Laravel on Windows, I could be wrong but if you have Git installed already you will also need to add it as a variable in your Paths to be used in your prompts.
The link below should help you in setting the Paths to Git and they should be something along these lines.
;"C:\path\git\bin";"C:\path\git\cmd"
http://www.computerhope.com/issues/ch000549.htm

I bullishly downloaded and installed GIT not knowing option to choose (used command prompt option) as Romain suggested , reboot and retried and it worked. Lynda indeed have a chapter on installation but did not mention Git so following instruction failed. Note: only trying previous version failed, was ok for latest laravel 5 version before installation of Git. Thank you all...one day lost of trying and testing but happy ending :)

Related

unable to install Laravel via composer on Windows 7: "29 packages you are using are looking for funding"

I have installed Composer on windows 7 with the Composer-Setup.exe.
I am trying to install Laravel via Composer on Windows 7. I've tried 2 different commands:
composer global require laravel/installer
and
composer create-project laravel/laravel blog --prefer-dist
but they don't work.
In the end, there always a message: "29 packages you are using are looking for funding"
When I type composer fund to find out, it says that:
Composer could not find a composer.json file in C:\Users\Administrators
Does any one have any solution or any useful link?
Your composer.json file have some packages which have paid licence. However composer do not prevent installing Laravel due to this.
As per logs Laravel has been successfully installed. Can you check at the destination folder.

Cant install Laravel 6

I want to install Laravel 6 with Composer. I try with that command:
composer create-project --prefer-dist laravel/laravel laravel6 "6.*"
But i get that result:
[InvalidArgumentException]
Could not find package laravel/laravel with version 6.*.
Here is a screenshot
If i use:
composer create-project --prefer-dist laravel/laravel blog
It install the v5.5.28
Here is a screenshot
What can be the problem?
Which PHP version you are using? Laravel-6.* need PHP >= 7.2.0. Check your server-requirements for Laravel 6.*. May be you did not meeting the requirements for laravel 6.*. And after meeting the requirements run your command inside htdocs folder for xampp or www folder for wamp webserver.
your command are no longer supports so you should use:
composer create-project --prefer-dist laravel/laravel="6.*" laravel6
You forgot to add the "--prefer-dist " . So in your case, you have to use the:
composer create-project laravel/laravel --prefer-dist
in order to make it work. So just remove all the files from: d:\xampp\htdocs\laravel and then try again by following the below commands to your cmd (I guess you are using Windows!):
cd d:\xampp\htdocs\laravel
composer create-project laravel/laravel --prefer-dist
I think this should work for you just fine
You don't need to specify the version of Laravel 6. By default, Laravel 6 installs the latest version and its extension.
As I'm writing now the current and latest version of Laravel is: Laravel 6.0.4
The command below will install the current and the latest version in your laravel6 project.
composer create-project --prefer-dist laravel/laravel laravel6
You don't need to specify the version of Laravel 6. By default, Laravel 6 installs the latest version and its extension.
Via Composer Create-Project
Alternatively, you may also install Laravel by issuing the Composer create-project command in your terminal:
composer create-project --prefer-dist laravel/laravel your_project_name
I think it will be helpful for you. for more details visit laravel official website : https://laravel.com/docs/6.x/installation
Please check the permissions on the cache dir (/home/keynes/.composer/cache)
It's complaining it cannot write to this dir, or it may not exist.
Maybe it is installing an older laravel version from the cache dir.
Kindly upgrade your PHP version on your system.
Then install laravel commands
It will automatically install the lettest version depends on the PHP version.
Or you can mention on laravel command and set the laravel version like "6.0*" behind the laravel installer command.
I hope this will works 😊
The commands you are running should work. I would try clearing the composer cache:
composer clear-cache
and then
composer update
composer create-project --prefer-dist laravel/laravel="6.*" laravel6
before trying again. Looking at the screenshots there seem to be some permissions errors in the ~/.composer directory. This might also cause the composer clear-cache command to fail with an error.
So if clearing the cache doesn't work or you get an error, you might try moving the ~/.composer directory to a backup location, to force composer to regenerate it's settings.
mv ~/.composer ~/.composer.backup
And then try it again (be aware that composer update will likely take a noticeably longer time than usual and might be unresponsive for a while):
composer update
composer create-project --prefer-dist laravel/laravel="6.*" laravel6
If it still doesn't work, then you can restore the backup:
rm -rf ~/.composer
mv ~/.composer.backup ~/.composer
Then looking at the output of
composer config --list --global
might help determine the next thing to try.

Laravel 5.5 wont install with php7

I try to install Laravel 5.5 version so I run command:
composer create-project laravel/laravel test 5.5.*
but I got this error:
If you see the top of image I run command php -v and its clear that version i 7.0.27
How to solve my issue?
You can try to update your composer:
composer update
Or try to use the full php7 path, example:
/path/to/your/php7 composer.phar create-project laravel/laravel test 5.5.*
Seem your XAMPP not installed properly. Uninstall existing XAMPP and manually delete the entire folder. (take backup of htdocs if there s some files as well PHPmyadmin DB backups). And download XAMPP from here and install it.
Install composer
and run this
composer create-project --prefer-dist laravel/laravel test
It's PHP7, so composer install Laravel 5.5 or higher by-default
I had this issue and the problem was that an after php upgrade there was still two php versions running almost together, so, in my case composer was using one version of php and laravel use the other. To solve that problem i uninstalled all php versions, update my php repositories and then i made a fresh install of php, composer and laravel.
Nowadays I have laravel 5.5 running with php 7.2 and i added laravel in enviroment variables so when i need to creaste a new project i use laravel new project_name
Hope this helps you!
Don't specify a version for project
composer create-project --prefer-dist laravel/laravel test
By any chance is the PHP require value in composer.json not "php": ">=7.0.0"
Try adding --prefer-dist and remove 5.5.*
Laravel requires PHP >= 7.0.0, you currently have version 5.6.
Install a newer version of PHP or use homestead.

error using composer to install cakePHP 3

i am lost...
i am trying to do it the right way and am following the Quick Start Guide for installing cakePHP 3 on my ubuntu machine.
Got composer installed. Directory is /var/www/cakephp
and am trying to issue:
php composer.phar create-project --prefer-dist cakephp/app mayapp
or
composer create-project --prefer-dist cakephp/app may app
then i am simply getting:
[InvalidArgumentException]
Could not find package cakephp/app with stability stable.
i do not have a clue what i am doing wrong. Any suggestions?
cakephp/app exists on https://packagist.org, and the command looks ok to me.
Which PHP version are you using? That package is only available with PHP 5.4.16 or later, so you must update if you want to use CakePHP.
However, it is a good idea to only use the same PHP version of your public hosting, using a newer version will lead to problems when deploying your code. If your webspace or public server does not have the latest PHP 5.6 running, ask for an update.
I got same issue. But, as previous answer, myapp does not exists on packagist.org, so, you must use laravel/laravel instead, and, after created, rename the new laravel folder to your desired name and move to htdocs (for xampp) or www (for wamp), then, and I do not know why, go to : localhost/laravel/public/
and replace laravel with the name you gave to your project folder instead the laravel one.
You will see Laravel 5 fonts will appear on screen.
That's means Laravel is running.
Hey Please try these steps.
Download XAMPP Server.
Install XAMPP server.
Go to ..\xampp\php\php.ini and open.
Add this line (extension=php_intl.dll) or if exist uncomment.
Download Composer setup from https://github.com/composer/windows-setup/releases/
Install composer and give php.exe file in path
Open cmd and check now php version using command php -v. if its showing php version its means its working.
Now open cmd and cd on xampp\htdocs folder & run command composer create-project --prefer-dist cakephp/app app_name
Finished folder created in htdocs.
Hope this is helpful for you.

Selecting a version of Laravel when installing with composer

I have seen there is a new version of Laravel- 4.1 with new documentation in the laravel website. Few things have changed , really but i would like to continue using laravel version 4 for now. Is there any way i can do to install the version 4 and not 4.1 through composer? I'm asking that because version 4.1 is downloaded automatically whenever i run composer create-project laravel/laravel --pref destination in my terminal
You can specify version number after your destination
composer create-project laravel/laravel --prefer-dist 4.0
Composer documentation here
Even better if you add an asterisk after version number (4.2.*): the newest subversion will be installed e.g. 4.2.12 instead of 4.2.0
composer create-project laravel/laravel project-name --prefer-dist 4.2.*

Categories