I successfully installed PHP 5.3.29 on Ubuntu 14 with Apache 2 separately.
I installed PHP with the following method:
sudo -i
wget http://in1.php.net
I do this:
# wget wget http://in1.php.net/distributions/php-5.3.29.tar.bz2
# tar -xvf php-5.3.29.tar.bz2
# cd php-5.3.29
# ./configure --with-apxs2=/usr/local/apache2/bin/apxs
# make
# sudo make install
# sudo cp php.ini-development /usr/local/lib/php.ini.
Then change php.ini. Change the option,
short_open_tag = Off
to
short_open_tag = On
Check and modify the httpd.conf module php5:
LoadModule php5_module modules/libphp5.so
Add in httpd.conf:
SetHandler application/x-httpd-php
Restart apache2, default install in: /usr/local/apache2
# sudo /usr/local/apache2/bin/apachectl start
Check phpinfo is now read in your Apache installation like:
http://localhost