Installing PHP - spaceshiptrip/raspberrypi GitHub Wiki
Old Tech yeah, but there are some really simple things you can do with PHP. If you need it:
$ sudo apt-get install apache2 php libapache2-mod-php
You should get the following console out:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
apache2-bin apache2-data apache2-utils libapache2-mod-php7.0 libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap php-common php7.0
php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php
libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap php php-common php7.0 php7.0-cli php7.0-common php7.0-json
php7.0-opcache php7.0-readline
0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,559 kB of archives.
After this operation, 17.0 MB of additional disk space will be used.
Do you want to continue? [Y/n]