Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with php version #119

Closed
davidt22 opened this issue Dec 12, 2019 · 7 comments
Closed

Error with php version #119

davidt22 opened this issue Dec 12, 2019 · 7 comments

Comments

@davidt22
Copy link

Hi, there is an error when accesing to website:

Fatal Error: composer.lock was created for PHP version 7.3 or higher but the current PHP version is 7.2.22.

Can you fix it, please ?
Thanks

@eko
Copy link
Owner

eko commented Dec 12, 2019

Hi @davidt22,

Have you checked out the repository recently? Because the Dockerfiles specify a alpine:3.10 version and the corresponding PHP versions are 7.3.11-r0, see: https://pkgs.alpinelinux.org/packages?name=php7-fpm&branch=v3.10

I don’t think there is an issue here, it works for me. Could you double check please?

@ghost
Copy link

ghost commented Dec 20, 2019

Hi, i have the same problem. In cmd when i put php -v it says php 7.1

@hiroki-it
Copy link

hiroki-it commented Jan 2, 2020

@davidt22
@florianproxi

Hello!!

I had the same problem, but solved it in the following steps. 😃

I'm sorry that it's hard to read, because I'm not good at English. 😓

  1. To define the following in config of your composer.json
"config": {
    "platform": {
        "php": "7.2.22"
}
  1. To delete your composer.lock

  2. To execute composer install

  3. To try http://symfony.localhost

I hope you will go well. 👍

@eko
Copy link
Owner

eko commented Mar 24, 2020

Thank you for helping each other with this issue 👍 :)

Closing this now

@eko eko closed this as completed Mar 24, 2020
@Kaesthenics
Copy link

Thank you very much from france!!!

@cluis13915
Copy link

I solved it switching the Apache PHP version.

sudo a2dismod php7.1
sudo a2enmod php7.2
sudo systemctl restart apache2

@happy-code-time
Copy link

happy-code-time commented Oct 23, 2020

Have this error

Fatal Error: composer.lock was created for PHP version 7.4 or higher but the current PHP version is 7.3.23.

But the console gives me this output on php -v:

7.4.11

I have try:

sudo rm -rf /etc/php/7.1
sudo rm -rf /etc/php/7.2
sudo rm -rf /etc/php/7.3
sudo rm -rf /etc/php/8.0
sudo systemctl restart apache2

rm composer.lock
composer update

rm composer.lock
rm -rf vendor
composer install
sudo systemctl restart apache2

  1. Finally it works for me

sudo a2dismod php7.1
sudo a2dismod php7.2
sudo a2dismod php7.3
sudo a2dismod php8.0

sudo a2enmod php7.4

sudo systemctl restart apache2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants