I have always used the code below to install my PHP environment:
sudo apt-get install -qqy php5 sqlite php5-gd php5-sqlite libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql php5-intl php5-curl
However I can no longer do this as the latest version of PHP in Ubuntu 13.04 is PHP 5.4.9. This version has the known bug #63379 that basically destroys the logout handler from the Symfony Security Component.
I know I've got two options: install via adding a custom PPA (this post has all the details on that: How do I install different (upgrade or downgrade) PHP version in still supported Ubuntu release?) or via script.
Seeing as this is needed for a server that my company uses I simply won't be prepared to add these private PPAs due to security risks. But rather I would like to create a script to install any version of PHP and the above packages (sqlite, curl, etc) I normally install in one easy step via apt-get install.
Does anybody have a custom script that covers all the above mentioned packages? Also is there anything else I should watch out for via the script method for installing PHP?