Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

[SOLVED]PHP 7 and Ubuntu

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
9 posts • Page 1 of 1
nickcraig
Posts: 8
Joined: Thu May 26, 2016 7:57 pm

[SOLVED]PHP 7 and Ubuntu
  • Quote

Post by nickcraig » Thu May 26, 2016 8:17 pm

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.
Top

nickcraig
Posts: 8
Joined: Thu May 26, 2016 7:57 pm

Re: PHP 7 and Ubuntu
  • Quote

Post by nickcraig » Thu May 26, 2016 9:27 pm

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?
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: PHP 7 and Ubuntu
  • Quote

Post by mehargags » Thu May 26, 2016 10:22 pm

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.
nickcraig wrote: I have tried a few different things and nothing seems to work
What did you try ? how do we know ? what failed ?
nickcraig wrote:I run "php -v" I see that but phpinfo still shows php 5
Please state how you installed PHP7 to let us know where the problem can be.
Top

nickcraig
Posts: 8
Joined: Thu May 26, 2016 7:57 pm

Re: PHP 7 and Ubuntu
  • Quote

Post by nickcraig » Fri May 27, 2016 2:25 pm

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: PHP 7 and Ubuntu
  • Quote

Post by mehargags » Sat May 28, 2016 1:53 am

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 :)
Top

nickcraig
Posts: 8
Joined: Thu May 26, 2016 7:57 pm

Re: PHP 7 and Ubuntu
  • Quote

Post by nickcraig » Sat May 28, 2016 3:28 pm

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.
Top

nickcraig
Posts: 8
Joined: Thu May 26, 2016 7:57 pm

Re: PHP 7 and Ubuntu
  • Quote

Post by nickcraig » Sat May 28, 2016 4:21 pm

Bingo got it. Run 'a2dismod php5' then run 'a2enmod php7.0'. After restarting Apache2 we are up and running.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: PHP 7 and Ubuntu
  • Quote

Post by mehargags » Sat May 28, 2016 6:29 pm

Great - pls mark the topic solved
Top

hcjsy
Posts: 16
Joined: Tue Jun 07, 2016 3:56 pm

Re: [SOLVED]PHP 7 and Ubuntu
  • Quote

Post by hcjsy » Wed Jun 08, 2016 8:00 am

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
Top


Post Reply
  • Print view

9 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password