0

I upgraded my PHP version so I can install some software on my Raspberry Pi. I followed these instructions from Heidi's Lab:

In /etc/apt/sources.list change stretch to buster, which is the next-stable/testing repository.

Update System:

sudo apt-get update && sudo apt-get upgrade

Remove previous PHP:

sudo apt-get remove '^php.*'

Install PHP 7.1:

sudo apt-get install php7.1-fpm php7.1-cli or sudo apt-get install php7.1

However, when I now visit a PHP page in my browser I can just see the PHP rather than the code being run. As you can probably tell, I'm a Linux novice and I'm fumbling my way through this.

Any advice would be greatly appreciated.


When I run php -v I get:

PHP 7.1.20-1+b2 (cli) (built: Aug  3 2018 03:45:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.20-1+b2, Copyright (c) 1999-2018, by Zend Technologies
2
  • Your problem lies with your webserver set-up not with PHP. – Dougie Mar 23 '20 at 14:39
  • If you ignore the Foundation instruction to perform a fresh install you have to debug yourself - there are many incompatibilities – Milliways Mar 23 '20 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.