在ubuntu14.04上使用apache安装PHP5.3
问题描述:
I need to install php5.3 for my cake php project. I installed php5.3.29 and apache separately. now in terminal it shows the php version as 5.3.29 and while i run localhost/info.php it shows the following output on browser
<?php
phpinfo();
?>
Tried many solutions here but none worked
How can i solve this?
答
o perl -pe 's|\Q.ph(p[345]?\E|.ph((p[345]?)| if $. <= 3' /etc/apache2/mods-available/php5.conf
This made it work.
答
sudo apt-get remove apache* php*
sudo apt-get update && sudo apt-get install apache2 php5
if need mysql & phpmyadmin
sudo apt-get install mysql-server phpmyadmin