0

i have installed PHP as given in link Installing PHP 5.3 in Ubuntu 14.04, php -v command show correct version in command, but when i run the file from browser http://localhost/a.php in browser code comes as it is.

what to do to execute the code

Thanks

  • 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
  • 888
  • 7
  • 17