Home Cryptocurency Exchangesphp7 – How to install PHP 7?
php7 – How to install PHP 7?

php7 – How to install PHP 7?

The above process did not work for my Ubuntu 15.10 server so I thought I would share what did work in case others find it helpful.

First I had to remove certain key PHP 5 modules:

sudo apt-get -y purge php5 libapache2-mod-php5 php5 php5-cli php5-common php5-curl php5-gd php5-imap php5-intl php5-json php5-mcrypt php5-mysql php5-pspell php5-readline php5-sqlite

Then remove a few extra things that were left behind:

sudo apt-get autoremove

Then install PHP 7.0:

sudo apt-get install php7.0

Then as PHPMyAdmin was removed Apache2 wouldn’t start so I had to remove the config file (I could have moved it instead):

sudo rm /etc/apache2/conf-enabled/phpmyadmin.conf

Then I had to restart Apache2:

sudo service apache2 restart

PHP 7.0 was then running (confirmed with PHPINFO();)

However I have found the only way to get PHPMyAdmin working is to install/upgrade it manually as otherwise the latest version available in the sources doesn’t support PHP 7 yet.

**EDIT: I have now found a way to get PHPMyAdmin updated to a compatible version without having to clone from GIT or compile manually from sources so I am adding this below:

First add this repository, update sources list and upgrade (NB: if it has been removed during the upgrade to PHP7 you will need to install rather than upgrade it):

sudo add-apt-repository ppa:nijel/phpmyadmin
sudo apt-get update
sudo apt-get dist-upgrade

However during installation (on my server) it had to run a database upgrade script upgrade_column_info_4_3_0+.sql but this failed with the following error:

mysql said: ERROR 1060 (42S21) at line 28: Duplicate column name ‘input_transformation’

I chose to ignore the error and complete the upgrade.
After installation I opened the .sql upgrade script at /usr/share/phpmyadmin/sql/upgrade_column_info_4_3_0+.sql

I ran the script manually removing the two offending lines trying to create 2 columns that already existed (code to remove):

ALTER TABLE `pma__column_info`
ADD `input_transformation` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ”,
ADD `input_transformation_options` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ”;

Finally I had to edit the config file at /etc/phpmyadmin/config.inc.php and add the following two lines:

$cfg[‘Servers’][$i][‘designer_settings’] = ‘pma__designer_settings’;
$cfg[‘Servers’][$i][‘export_templates’] = ‘pma__export_templates’;

After this PHPMyAdmin is successfully updated and the extended features are enabled.
Hope this helps others.


Leave a Reply

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

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.