I'm implementing some PHP code into my html bit and it seems as if PHP is not being treated as a PHP code but as a plain text instead.
I checked my PHP installation with php -v and it's up to date on version 7.0.
Then I looked over apache's configuration file and strangely I didn't find any lines related to PHP. I was like what the heck.
I used the keystrokes Ctrl+w and typed PHP to ensure I haven't overlooked it somewhere but nada.
What can I do?
I tried to comment out the following in php.config file:
# To re-enable PHP in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
#<IfModule mod_userdir.c>
# <Directory /var/www/html>
# php_admin_flag engine Off
# </Directory>
#</IfModule> 3 1 Answer
Problem solved by following steps I found here:
... where fellow developer suggested to change file's extension from .html to .php and all my code should be interpreted just fine. And it worked.