I have been trying to update my system's php from 5.4.45 to 7.0. Is it even possible? How do i do it?

Following are the results of my commands to update the php version.

uname -a

> Linux Debian-70-wheezy-64-minimal 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u4 x86_64 GNU/Linux

php --version

>PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 2 in Unknown on line 0
PHP 5.4.45-0+deb7u1 (cli) (built: Sep 10 2015 08:34:47)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

apt-get update

>W: GPG error: http://repo.mysql.com wheezy Release: The following signatures were invalid: KEYEXPIRED 1487236823 KEYEXPIRED 1487236823 KEYEXPIRED 1487236823

apt-get update command is stopped on the above error. I tried to search internet but they are saying that first I have to remove php5. I don't want to take risk. Is there any better solution?

  • You might not want to do that, at least not without testing all your vhost in a test server. v7 is largely incompatible with v5. – Rui F Ribeiro Aug 6 '17 at 12:19

You will have to update the GPG keys to the repo. Run this :

apt-key adv --keyserver pgp.mit.edu --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5

And then :

apt-get update && apt-get upgrade

You should then be able to install a higher version of mysql.

Your Answer

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 or ask your own question.