Update PHP /Ubuntu
Update PHP /Ubuntu
Hello,
what is the best way to update php from version 5.5.9 to newest ? is good to install php 7, is in this version everithing working correctly ?
Have you some tutorials how to update it on ubuntu ?
Thank you
what is the best way to update php from version 5.5.9 to newest ? is good to install php 7, is in this version everithing working correctly ?
Have you some tutorials how to update it on ubuntu ?
Thank you
-
- Posts: 12
- Joined: Sun Aug 30, 2015 3:05 pm
Re: Update PHP /Ubuntu
i tried
now when i use php -v in terminal i have
but wordpres is showing me that i have php version 5.5.9 and when i use phpinfo script i get this
Some one who can help me with updating ?
Code: Select all
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
Code: Select all
PHP 7.0.9-1+deb.sury.org~trusty+1 (cli) ( NTS )
Code: Select all
PHP Version 5.5.9-1ubuntu4.17
Re: Update PHP /Ubuntu
Try to setup your own phpinfo.php file with the following content:
So you can show an "uncached" php info about your system. If you are able to run php -v inside commandline with the correct output, it should also work for your websites.
Best Regards
Raphael
Code: Select all
<?php
echo phpinfo();
?>
Best Regards
Raphael
Re: Update PHP /Ubuntu
You should remove the old Apache module and install the one for PHP7.
Something like:
Something like:
Code: Select all
sudo apt-get install libapache2-mod-php7.0
sudo a2dismod php5
sudo a2enmod php7.0
-
- Posts: 8
- Joined: Tue Nov 08, 2016 12:22 pm
Re: Update PHP /Ubuntu
This problem seems to be solved (also see http://forum.vestacp.com/viewtopic.php? ... 306#p52306), marking your threats as SOLVED helps tremendously to clean up the forum.
Thanks.
Thanks.