I\'m hoping that this will be a useful page for getting started running php code as well as solve the current problem I\'m having some very simple code as follows:
If you have the contents of the web page in user directory like:
/home/*/public_html
Then you need to enable executing those, it's disabled by default:
# Running PHP scripts in user directories is disabled by default
#
# To re-enable PHP in user directories comment the following lines
# (from to .) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
php_admin_flag engine Off
Just comment out this piece of code located in the file:
/etc/apache2/mods-enabled/php7.3.conf
Adjust the path and file name to your system, PHP version, etc.