JIBE

PHP 5.2.10 .debs for Ubuntu 10.10 (Maverick)

0 min read

Ben Holt

If you caught my earlier post you'll know I have a co-worker who loves to play with the newest toys. Well, here we are a few short days after Ubuntu 10.10 (Maverick) has been released and he's now loving his upgraded computer except, you guessed it, he needs PHP 5.2 for some of the older drupal sites he has to work on, and Maverick ships with PHP 5.3. Drupal 6 and 7 core are both PHP 5.3 compatible, however not all of the contrib modules have been updated. Drupal 5 is not PHP 5.3 compatible. What I have posted here (at the bottom of this post) are the latest PHP 5.2 packages from Ubuntu 9.10 (Karmic) compiled on 10.10 (Maverick) and using the 10.10 libraries. Here is a quick run down of how I built them. If you need to forward port anything else (like the Lucid xserver-xorg packages for a video card that require Nvidia legacy 96 drivers) you can go through similar steps.

Install the build essentials packages apt-get build-essential Install the PHP5 build dependencies for Maverick apt-get build-dep php5 Create a directory and install the Karmic PHP5 sources to it (look the sources up at http://packages.ubuntu.com) mkdir /usr/local/src/php5.2 cd /usr/local/src/php5.2 wget http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.2.10.dfsg.1-2ubuntu6.5.dsc wget http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.2.10.dfsg.1.orig.tar.gz wget http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.2.10.dfsg.1-2ubuntu6.5.diff.gz Prepare the source for building tar -xzf php5_5.2.10.dfsg.1.orig.tar.gz cd php-5.2.10 gunzip -c ../php5_5.2.10.dfsg.1-2ubuntu6.5.diff.gz | patch -p1 Build the .deb files dpkg-buildpackage

Don't be surprised if the build fails the first (or more) times. You will have the dependencies for the current Maverick PHP5 packages installed, however the version numbers are almost certainly different than the ones expected by the Karmic PHP5 packages. If the build fails look at the error message(s). For instance, I received a dependency error about libdb. I did a 'dpkg -l | grep libdb' and confirmed that I had libdb4.8 and libdb4.8-dev installed. I then edited the control file (/usr/local/src/php-5.2.10/debian/control) and changed the Build-Depends reference to libdb4.6-dev to libdb4.8-dev and tried building again. In my own case this was the only change I needed to make, however this is likely because I had built the earlier packages on this same Ubuntu install and then upgraded it to Maverick to build these ones, so I had probably made other changes to the control file earlier.

libapache2-mod-php5_5.2.10.dfsg.1-2ubuntu6.5_i386.deblibapache2-mod-php5filter_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5_5.2.10.dfsg.1-2ubuntu6.5_all.debphp5-cgi_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-cli_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-common_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-curl_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-dbg_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-dev_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-gd_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-gmp_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-ldap_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-mhash_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-mysql_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-odbc_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-pgsql_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-pspell_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-recode_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-snmp_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-sqlite_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-sybase_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-tidy_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-xmlrpc_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp5-xsl_5.2.10.dfsg.1-2ubuntu6.5_i386.debphp-pear_5.2.10.dfsg.1-2ubuntu6.5_all.deb

If you need instructions for installing the packages, or pinning them so that Ubuntu doesn't try to upgrade them to PHP5.3, please see my earlier post. It should go without saying, if you use these deb packages you do so at your own risk.

Update

And here are the 64 bits debs:

libapache2-mod-php5_5.2.10.dfsg.1-2ubuntu6_amd64.deblibapache2-mod-php5filter_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5_5.2.10.dfsg.1-2ubuntu6_all.debphp5-cgi_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-cli_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-common_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-curl_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-dbg_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-dev_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-gd_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-gmp_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-ldap_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-mhash_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-mysql_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-odbc_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-pgsql_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-pspell_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-recode_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-snmp_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-sqlite_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-sybase_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-tidy_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-xmlrpc_5.2.10.dfsg.1-2ubuntu6_amd64.debphp5-xsl_5.2.10.dfsg.1-2ubuntu6_amd64.debphp-pear_5.2.10.dfsg.1-2ubuntu6.5_all.deb