We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
[SOLVED]PHP 7 and Ubuntu
[SOLVED]PHP 7 and Ubuntu
Does anyone have a guide on how to get php7 up and running on Vesta using Ubuntu? I have tried a few different things and nothing seems to work.
Last edited by nickcraig on Sun May 29, 2016 1:30 am, edited 1 time in total.
Re: PHP 7 and Ubuntu
So I have PHP 7 installed and when I run "php -v" I see that but phpinfo still shows php 5. How do I tell Apache to look for PHP 7?
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: PHP 7 and Ubuntu
First, learn how to ask questions on Support Forum. Mention your OS Version and your Server Specs.
Second, Learn to search the forums before asking such a generic question.
Third, Quote the procedure/guide you followed, the commands you issued to install your PHP7.
Second, Learn to search the forums before asking such a generic question.
Third, Quote the procedure/guide you followed, the commands you issued to install your PHP7.
What did you try ? how do we know ? what failed ?nickcraig wrote: I have tried a few different things and nothing seems to work
Please state how you installed PHP7 to let us know where the problem can be.nickcraig wrote:I run "php -v" I see that but phpinfo still shows php 5
Re: PHP 7 and Ubuntu
So I am running Ubuntu 14.04 with the latest version of Vesta. I added the php7 ppa and installed it using this https://www.digitalocean.com/community/ ... untu-14-04.
I was able to get php7 installed and running "php -v" reflects that php7 is installed. When I upload a phpinfo file it still shows php5 is running. Im not sure where to tell apache to use php7 and not php5. Thanks for the help.
I was able to get php7 installed and running "php -v" reflects that php7 is installed. When I upload a phpinfo file it still shows php5 is running. Im not sure where to tell apache to use php7 and not php5. Thanks for the help.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: PHP 7 and Ubuntu
You Upgraded PHP to PHP7... which means that PHP5 got replaced by PHP7.
Are you running Apache + Nginx as Rev. proxy or Nginx + PHP-FPM ? may be the FPM pkg didn't upgrade in the latter case.
Did you try restarting apache and nginx ? infact I would recommend restarting your server once (if possible) and see if shows php7. Else PM me your SSH details, I'll look into the issue :)
Are you running Apache + Nginx as Rev. proxy or Nginx + PHP-FPM ? may be the FPM pkg didn't upgrade in the latter case.
Did you try restarting apache and nginx ? infact I would recommend restarting your server once (if possible) and see if shows php7. Else PM me your SSH details, I'll look into the issue :)
Re: PHP 7 and Ubuntu
I am running Apache + Nginx, and I have restarted the server. I guess I just need to tell Apache to use PHP7 instead of PHP5.
Re: PHP 7 and Ubuntu
Bingo got it. Run 'a2dismod php5' then run 'a2enmod php7.0'. After restarting Apache2 we are up and running.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: PHP 7 and Ubuntu
Great - pls mark the topic solved
Re: [SOLVED]PHP 7 and Ubuntu
for those who installed php7 and noticed that there websites arent compatable and want to go back to php5, I did the following to go back to php5:
apt-get install ppa-purge
add-apt-repository --remove ppa:ondrej/php
ppa-purge ppa:ondrej/php-7.0
apt-get purge php7.0-common
a2enmod php5
apt-get install ppa-purge
add-apt-repository --remove ppa:ondrej/php
ppa-purge ppa:ondrej/php-7.0
apt-get purge php7.0-common
a2enmod php5