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?
I have installed PHP as given in link Installing PHP 5.3 in Ubuntu 14.04.
php -v
command show correct version.http://localhost/a.php
, code comes as it is.What to do to execute the code?
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.