0

I have installed PHP as given in link Installing PHP 5.3 in Ubuntu 14.04.

  • In the terminal: php -v command show correct version.
  • When I run the file from the browser http://localhost/a.php, code comes as it is.

What to do to execute the code?

sotirov
  • 3,169
  • Do you have a web server like Apache installed? It looks like you do not have it installed or properly configured. – Mike Sep 25 '15 at 12:24

1 Answers1

1

This usually means that PHP is not being interpreted because the webserver does not know how to handle it. Is mod-php installed? Try the following:

$ sudo apt-get install libapache2-mod-php5
$ sudo a2enmod php5

Did you try to configure FCGI, maybe? In that case there is probably an error in your configuration.

David
  • 908