Skip to: Site menu | Main content

Blog > Removing PHP4 from Dapper boxes

>> Removing PHP4 from Dapper boxes

Wed, Apr 9th 10:35am 2008: Linux

This is the second time I've run into this problem this week, and being rather thick in the head I couldn't remember how I fixed it the first time a whole, oh, 48 hours ago. Hence this data insertion into my externalised long-term memory to bypass my buggy wetware. An Ubuntu Dapper server had originally been running Apache/PHP4 (libapache-mod-php4) and at some point was switched to Apache2/PHP5 (libapache2-mod-php5). Doing some cleaning up I tried to remove ye olde PHP4 and got this: root@web160:~# aptitude remove libapache-mod-php4 Reading package lists... Done Building dependency tree... Done Reading extended state information Initializing package states... Done Building tag database... Done The following packages will be REMOVED: libapache-mod-php4 0 packages upgraded, 0 newly installed, 1 to remove and 45 not upgraded. Need to get 0B of archives. After unpacking 3187kB will be freed. Writing extended state information... Done (Reading database ... 28126 files and directories currently installed.) Removing libapache-mod-php4 ... Error: mod_php.so does not have a corresponding .info file. The above errors might cause apache to not work properly or start Please refer to the documentation on how to fix it or report it to Debian Apache Mailing List <debian-apache@lists.debian.org> if in doubt on how to proceed dpkg: error processing libapache-mod-php4 (--remove): subprocess pre-removal script returned error exit status 20 Errors were encountered while processing: libapache-mod-php4 E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: root@web160:~# Boom. The fix? Simple once you know. Just do: echo "LoadModule: php_module /usr/lib/apache/1.3/mod_php.so" > /usr/lib/apache/1.3/501mod_php.info Then try again. Bye bye PHP4!

Bookmark and Share