Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.5. and PHP 7

Tags:

php

laravel

I am updating to Laravel 5.5. which uses PHP 7.0 version. I need to do setup on my local machine and on AWS as well. First, locally WAMP server is installed which comes with PHP 7.0 ... I've selected it and when localhost is opened I get the message that the PHP version is 7.0.10 ... After changing version numbers for Laravel and PHP in composer.json, I did update and got this message:

  • Problem 1
    • This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement. Problem 2
    • laravel/framework v5.5.2 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
    • laravel/framework v5.5.1 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
    • laravel/framework v5.5.0 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
    • Installation request for laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0, v5.5.1, v5.5.2].

It is written that I still use 5.6. How can I change this?

like image 586
harunB10 Avatar asked Dec 23 '22 14:12

harunB10


2 Answers

According to @iainn Apache is using PHP 7, but the CLI (which Composer uses) is still using 5.6 hence, trying to uninstall and install composer again and select the correct php version (7.0) while setup. Check below screenshot

enter image description here

like image 200
Narayan Avatar answered Dec 26 '22 03:12

Narayan


You're getting an error from composer. Try using 'composer install --ignore-platform-reqs' to setup your project folder.

like image 31
ojikobeshi Avatar answered Dec 26 '22 03:12

ojikobeshi