PHP files are downloaded by browser instead of processed by the server, how to solve it?

PHP files are downloaded by browser instead of processed by the server, how to solve it?
by Janeth Kent Date: 16-08-2013

After upgraded some packages in my ubuntu server, sometimes php configuration goes crazy and PHP files are downloaded by browser instead of processed by the server, how to solve it? Here are the steps to solve fastly the problem.
 
Follow thiese commands:
 
Code:
sudo a2enmod php5
and it said "Module php5 already enabled". 
 
re-starting apache2 with the following command:
 
Code:
sudo apache2ctl restart
and PHP started parsing and working fine after that. 
 
 
Alternatively use these steps too:
I already have apache2 server running on my machine, so I reinstall only PHP5 and mySQL 5 using
 
Code:
sudo apt-get install php5-mysql libapache2-mod-php5 mysql-server
 
(During the installation, the apache2 server on my machine stops and re-starts.)
 
 
Then repeat the steps above.
 
by Janeth Kent Date: 16-08-2013 hits : 4278  
 
Janeth Kent

Janeth Kent

Licenciada en Bellas Artes y programadora por pasión. Cuando tengo un rato retoco fotos, edito vídeos y diseño cosas. El resto del tiempo escribo en MA-NO WEB DESIGN AND DEVELOPMENT.

 
 
 
Clicky