0

I have on my webserver apache2 and php:

enter image description here

But if I write this code on my website:

<?php
phpinfo();
?>

I don't get the output you should get. The site just displays this :

<?php
phpinfo();
?>

Any solution?

muru
  • 197,895
  • 55
  • 485
  • 740

1 Answers1

2

PHP 5

To verify that the php module is loaded, type:

a2query -m php5

if not enabled, then load with:

sudo a2enmod php5

and restart apache:

sudo service apache2 restart

PHP 7.0

Install:

sudo apt-get install apache2 php7.0 libapache2-mod-php7.0 

Verify:

a2query -m php7.0

Load:

sudo a2enmod php7.0

Restart apache:

sudo service apache2 restart
sbarb
  • 109