I have seen some help on this online but for other distros. Before I screw something up, I would love some help on this for my exact setup which is below. This will ultimately be for upgrading Laravel to 5.6 which needs newer php version.

Bạn đang xem: How to downgrade and upgrade php 7

Ubuntu LTS, MariaDB, nginx, Laravel 5.5, AWS EC2 instance

Đang xem: Cách cài Đặt & nâng cấp php 5, cách cài Đặt và cấu hình php 7

*

Use terminal and download repo:

sudo add-apt-repository ppa:ondrej/php sudo apt-get updateThen install:

service apache2 stop sudo apt-get install php7.1 php7.1-commonStart using php 7.1:

a2enmod php7.1 service apache2 restartCheck version:

php -vMore for apache : https://jakelprice.com/article/how-to-upgrade-from-php-70-to-php-71

More for NGINX: https://www.howtoforge.com/tutorial/installing-nginx-with-php7-fpm-and-mysql-on-ubuntu-16.04-lts-lemp/

*

I was also wondering how to update to the latest 7.1.* version. I had PHP 7.1.7 but for Symfony 4 I need >=7.1.8.I coudn”t find an explanation how to updated. Finally I check how I installed the latest version:

Xem thêm: Gái Ngoan Ngoại Tình Vì Chồng Yếu Sinh Lý Vợ Ngoại Tình Vì Chồng Yếu Sinh Lý

*

Use Vagrant + DockerYou can use Vagrant + Docker to replicate your environment except for PHP which will be 7.1 and see if the app is still working 🙂

*

Thanks for contributing an answer to Stack Overflow!

Please be sure to answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged php laravel ubuntu or ask your own question.

Xem thêm: Sửa Lỗi Tiếng Anh Siêu Hiệu Quả, Sửa Lỗi Trong Tiếng Tiếng Anh

*

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *