How I downgrade PHP 5.4 to PHP 5.3?

php
downgrade

#1

Some applications in the Univention App Center rely on PHP 5.4 These apps automatically include a package repository with PHP 5.4. If the app using PHP 5.4 is no longer used, it is possible to downgrade the PHP installation to 5.3 using the following instructions:

1. First you need to determine the latest version number of the standard PHP package in UCS 3.2 by running the following command:

apt-cache show php5-common | grep Version Version: 5.4.4-14.196.201406041536 Version: 5.3.3-7.169.201110291204 Version: 5.3.3-7.173.201202061729 Version: 5.3.3-7.175.201206120937 Version: 5.3.3-7.176.201211121028 Version: 5.3.3-7.177.201303141147 Version: 5.3.3-7.181.201308291557 Version: 5.3.3-7.190.201312160852
In this example the latest version of PHP 5.3 is 5.3.3-7.190.201312160852 .

2. Now you must detect which PHP 5.4 packages are installed on your system:

dpkg --list | grep 5.4.4-14 ii libapache2-mod-php5 5.4.4-14.196.201406041536 server-side, HTML-embedded scripting language (Apache 2 module ii php5 5.4.4-14.196.201406041536 server-side, HTML-embedded scripting language (metapackage) ii php5-cli 5.4.4-14.196.201406041536 command-line interpreter for the php5 scripting language ii php5-common 5.4.4-14.196.201406041536 Common files for packages built from the php5 source

3. The following command can be used to downgrade to the installed packages to 5.3 (the list of packages depends on the output listed in step 2 and the version gathered in step 1), e.g.:

V53=5.3.3-7.190.201312160852 apt-get install libapache2-mod-php5=$V53 php5=$V53 php5-cli=$V53 php5-common=$V53 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libapache2-mod-php5 php5 php5-cli php5-common php5-suhosin Suggested packages: php-pear The following NEW packages will be installed: php5-suhosin The following packages will be DOWNGRADED: libapache2-mod-php5 php5 php5-cli php5-common 0 upgraded, 1 newly installed, 4 downgraded, 0 to remove and 0 not upgraded. Need to get 6630 kB of archives. After this operation, 328 kB disk space will be freed. Do you want to continue [Y/n]?
4. Finally the PHP4 component should be disabled:

ucr unset repository/online/component/php54