I have faced the following problem during the installation of laravel php framework.
following errors appeared when I run the command composer global require "laravel/ installer".
NB: I already have installed xampp, composer and add these to environment variable.
the following picture will clear the problem. enter image description here
I have used php version 5.6 and tried to install laravel having this version.
Later I have uninstalled xampp and install the latest version of xampp and things are working now
I am new to Symfony skeleton. Can anyone please help to get out from this error for installation of Symfony? I had searched a lot on the internet but cannot find any working solutions. Composer is working well. I am using PHP7 and XAMP server.
Error is Could not find package Symfony/skeleton with stability Stable in a version installable using your PHP version 7.0.2.
Cerad's answer is correct. Please check Requirements for Running Symfony
It states the following:
Symfony 4.0 requires PHP 7.1.3 or higher to run, in addition to other minor requirements.
If you have to live with php7.0, you are able to install the symfony demo project via symfony installer, see how to install symfony installer for sf3.4.
After you have installed sf installer, you can install the demo project with old symfony version by doing:
$ symfony new blog 3.0.1
As mentioned by Cerad, you need have php7.1 or newest php version to install latest symfony demo project. But you can also have a try to install the demo project with older version by doing:
$ composer create-project symfony/website-skeleton:3.3
you can find the the release version which you need here
You just need to change your Php version from 7.02 to upper version.
I had the same issue, my path variable was pointing at php7.0., change it to php7.2. and the problem solved immediatly.
Important : Don't forget to restart you terminal.
I had a similar problem not being able to find 4.4 without php version part.
In case some one comes in contact with this (As I did), installing Symfony CLI and using it instead of direct composer, might solve the problem.
I was actually able to install Symfony 4.4 project as below
composer create-project symfony/website-skeleton:"^6.0" yourProjetName
try to specify the version 6.0
It solved my problem
I encountered this error while installing Symfony Demo App (Symfony 6). If your PHP runtime has passed symfony check:requirements, you may want to enable PDO-SQLite PHP extension or other project requirements such as the supported PHP version - Symfony Demo's Requirements.
Assuming that OP's goal is to setup and install Symphony, according to Synfony's Official Docs there are various ways one can go about doing it.
First of all, make sure one is satisfying all the requirements. For my example I will be using the most recent versions of Symphony and PHP:
Install PHP 8.1 or higher and these PHP extensions (which are
installed and enabled by default in most PHP 8 installations): Ctype,
iconv, PCRE, Session, SimpleXML, and Tokenizer;
Install Composer, which is used to install PHP packages.
Optionally, you can also install Symfony CLI. This creates a binary called symfony that provides all the tools you need to develop and run your Symfony application locally.
In this case, it seems that OP has already installed both PHP and composer, however OP might have to update the PHP version (as Cerad mentioned).
Now, depending on one's goals, there are different ways to move one:
If one is building a traditional web application open the CMD or Git Bash, and run
composer create-project symfony/skeleton:"6.1.*" my_project_directory
Then
cd my_project_directory
And
composer require webapp
If one is building a microservice, console application or API, then open the CMD or Git Bash and run
composer create-project symfony/skeleton:"6.1.*" my_project_directory
Notes:
In both cases, by specifying the version shouldn't give us the error that OP is facing.
If error keeps on appearing, would recommend using CMD or Git Bash as I've tried here and worked fine with both.
you forgot to specify the installation folder. Use a dot to install in the current folder.
I have two xampp versions in my machine one have php version 5.4 and other having 7.1(recently installed.) I usually use composer command to download laravel. previously i get laravel version 5.0.X when i download because of my php vesrion(5.4) but even after installing new xampp(having php version 7) composer is downloading laravel 5.0.x only. When i check my php version it is showing 5.4 now how can i choose or connect latest php version to composer so that i will get latest laravel version.
Finally i found the solution. I changed my composer path to new php version and now getting what i want.
I set my Environment variables as follow:
change name of respective document xampp that contains your project I want to launch.
my system context
I'd like to use Laravel 5.4 on my production server but the latest PHP 5.6 version available is 5.6.30 (as my local XAMPP installation as well), while the requirements for Laravel 5.4 are php >= 5.6.40 as for https://packagist.org/packages/laravel/laravel
Now, I've successfully installed Laravel 5.4 on the server in a subdirectory via SSH and the home page is showing the Laravel logo. Is there some problems I could encounter using this version of PHP down the road? If so, is there any polyfill or adjustment to be made in order to use Laravel 5.4 on PHP 5.6.30 instead of PHP 5.6.40? Thanks
Laravel require php 5.6.4 as you can see here
and XAMPP is 5.6.30 - This version is NEWER than 5.6.4 ( see all php versions here )
So no problems are expected becase you are using newer version than required by Laravel.
composer create-project --prefer-dist laravel/laravel (project name) 5.4.*
that will install the latest version of laravel supported by php 5.6
see in the attachment above
composer create-project --prefer-dist laravel/laravel (project name) 5.4.*
Laravel 5.4 is compatible with PHP 7.x. Please check the following article.
https://murze.be/2016/01/why-we-are-requiring-php-7-for-our-new-packages/
I created a webapplication using Laravel 5.1 and PHP v. 5.6. However, I need to clone this into a CentOS server which has PHP v. 5.4.16 installed.
Whenever I run composer install, I get the following error:
Warning: The lock file is not up to date with the latest changes in
composer.json. You may be getting outdated dependencies. Run update to
update them. Your requirements could not be resolved to an installable
set of packages.
Followed by packages that require PHP >= 5.5.9.
Is there a workaround to make this application work without updating PHP?
Thanks in advance!
You cannot install Laravel 5.1 on a server running PHP 5.4. You really have 2 options:
Try upgrading PHP
Migrate your application to Laravel 5.0
Migrating should not be that much work, especially if you have tests setup for your application. There will be some features in your 5.1 app that you may lose and have to work around to migrate to 5.0, but overall, it shouldn't be too difficult.