Update ruby version to 2.1.3
Update script to install PHP 5.6 and fix some PHP configuration errors