Install PHP 5.5.4 on Ubuntu 12.04

Aug 29th, 2013

Need a newest version of PHP on my Ubuntu 12.04 box.

Ondřej Surý and some fair guys from debian php team are maintaining ready made package for Ubuntu (see Launchpad).

Installation

Save your php.ini file

sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get dist-upgrade

If your virtual hosts file have an other extension than .conf, rename them, re a2ensite them and reload apache.

All my virtual hosts are now 403 Forbidden !

You’ve just upgraded for an Apache 2.4.6+ and if you set your LogLevel to debug, you will find something like this in your error log :

[authz_core:error] [pid 31234] [client 127.0.0.1:49381] AH01630: client denied by server configuration: /home/www/site.dev

Yes ! A new security feature that appeared in Apache 2.4.3 and is set to Require all denied by default. SeeApache Module mod_authz_host documentation To unlock your virtual hosts, just add a Require all granted in your virtual host configuration.

<Directory /home/www/site.dev>
   Order allow,deny
   Allow from all
   # New directive needed in Apache 2.4.3:
   Require all granted
</Directory>

I’m now running Apache 2.4.6 with php 5.5.4.


Comments

comments powered by Disqus