Posted by & filed under PHP.

Sorry for the delay, but I had to come back from winter sports to have a decent Internet connection…

After being published by the PHP Group, PHP 5.2.9 anf its corresponding PECL extensions is now packaged for Lenny/Etch, amd64/i386. It fixes some annoying crashes and one security issue. The next release should be PHP 5.3.0 with some new interesting features (MySQL native driver, Phar, namespaces…).

Take a look at the official Changelog for more details before doing this recommanded upgrade.

51 Responses to “PHP 5.2.9 is packaged (at last)”

  1. pmenier


    Do you think this future release of php will be compatible with common blog/cms (ie: dotclear, joomla).

    I tested it 4 months ago (php-5.3alpha2) and these cms didn’t work anymore. I understand it’s not the job of php team to debug these portals but the changes beetween 5.2.x and 5.3.x seem to be very important…
    (ps: sorry for my poor english ๐Ÿ™‚

  2. Guillaume Plessis

    @pmenier: PHP 5.3 introduces some deep changes. Even if the PHP developpers try to maintain an ascendant compatibility (causing some troll about the namespaces’ syntax, for instance); I think PHP 5.3 will break some apps. You should be very careful when upgrading, ensure that dotclear, joomla… are certified for PHP 5.3 on their respective websites. (I didn’t have time to test 5.3 yet)

  3. Tim

    I have Etch and until 2 months ago I have always only used the official debian etch repos in my sources.list for upgrading. When 5.2.8 was still current I added the dotdeb repo (Thanks so much for providing this!) and happily and finally upgraded my PHP from Etch’s 5.2.0 to 5.2.8. Now I tried to do another dist-upgradeto make it to 5.2.9, but it is keeping all the packages back.

    libapache2-mod-php5 (5.2.8-0.dotdeb.1 => 5.2.9-0.dotdeb.1)
    libmysqlclient15-dev (5.0.32-7etch8 => 5.1.32-0.dotdeb.1)
    mysql-server (5.0.32-7etch8 => 5.1.32-0.dotdeb.1)
    php5 (5.2.8-0.dotdeb.1 => 5.2.9-0.dotdeb.1)
    php5-cli (5.2.8-0.dotdeb.1 => 5.2.9-0.dotdeb.1)
    php5-common (5.2.8-0.dotdeb.1 => 5.2.9-0.dotdeb.1)
    php5-gd (5.2.8-0.dotdeb.1 => 5.2.9-0.dotdeb.1)
    php5-imap (5.2.8-0.dotdeb.1 => 5.2.9-0.dotdeb.1)
    php5-mysql (5.2.8-0.dotdeb.1 => 5.2.9-0.dotdeb.1)

    apt-get check doesn’t show anythingbroken.
    Any advice on what I am missing?

  4. Guillaume Plessis

    @Tim : it’s not a bug, it’s a feature. Your sources.list still points to stable, as Etch is oldstable and Lenny is stable. Please fix it by using this line instead of the previous one :

    deb oldstable all

    (Change it to stable as soon as you want to upgrade to Lenny)

    Apt-get update then apt-get dist-upgrade and all shoud work fine.

  5. Void

    First of all, it’s a good news – I wait for 5.3 like hell. Will You package 5.3 stable version, or maybe we can count on some snapshots?

    Anyway, I was so impatient about 5.3 debs, I have started some work to create my own packages based on Yours 5.2.8 version. I’ve put my packed debian/ directory here:, maybe it will help You. It’s my first attempt at creating Debian packages at all, so I’m sorry for the poor quality of this ;-)). At the moment, dpkg-buildpackage -rfakeroot doesn’t build .deb files (I guess ‘rules’ and other files are messed up), but it seems to compile on my server (Lenny).

    I had to remove from series the fpm.patch, exif_nesting_level.patch (it’s already fixed in 5.3), and modify a lot of patches. Moreover, I would suggest getting rid of use_embedded_timezone.patch (please see:

    If I could be any of help, don’t hesitate to contact me.

  6. Frank

    I tried to update to php 5.2.9 on etch but there seem to be unresolved dependencies unavailable on etch. Libc6 is needed in Version 2.7 or greater. Are there known backports of libc6 for etch?

  7. Guillaume Plessis

    @Frank : as written in my post about Lenny, take care of the Dotdeb entries in your sources.list :

    It should refer to stable or lenny if you want to make the switch and take benefits from the brand new Debian distribution :
    deb http://your.mirror/ stable all
    deb-src http://your.mirror/ stable all
    It should refer to oldstable or etch if you want to stick to the good old Etch and to take your time to upgrade.
    deb http://your.mirror/ oldstable all
    deb-src http://your.mirror/ oldstable all

  8. Frank

    I forgot to mention that they are refering to oldstable – though i realised it later on. But cleaning apt/aptitude and refreshing didn’t make anything better regarding the libc6 stuff. :S

  9. Guillaume Plessis

    @Frank : I double-checked the php5 packages’ dependencies : they all depend on libc6 >= 2.3.6-6.

    Which mirror are you using? Which version of php5 is apt trying to install ? 5.2.9-0.dotdeb.0? 5.2.9-0.dotdeb.1?

  10. Frank

    tried different mirrors. currently the ones.

    it looks like it’s trying to install dotdeb.0 version of 5.2.9-0 :-S

  11. Guillaume Plessis

    @Arnaud : no problem, install explicitely mysql-server-5.0 instead of mysql-server (that is a metapackage depending on mysql-server-5.1)

  12. Arnaud Launay

    Too easy. ๐Ÿ™‚ BTW, is there any gpg key signing for the packages, like they do for debian-multimedia for example ? I can’t find anything on the site (and I think I’m a bit out of context…)

  13. Colin Lundy

    apt-get install php5-cli
    Reading package lists… Done
    Building dependency tree… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.

    Since you only requested a single operation it is extremely likely that
    the package is simply not installable and a bug report against
    that package should be filed.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    php5-cli: Depends: libc6 (>= 2.3.6-6) but 2.3.6-0ubuntu20.5 is to be installed
    Depends: libdb4.4 but it is not installable
    Depends: libreadline5 (>= 5.2) but 5.1-7build1 is to be installed
    Depends: libssl0.9.8 (>= 0.9.8c-1) but 0.9.8a-7ubuntu0.6 is to be in stalled
    Depends: libxml2 (>= 2.6.27) but 2.6.24.dfsg-1ubuntu1.4 is to be ins talled
    Depends: php5-common (= 5.2.9-0.dotdeb.0) but 5.1.2-1ubuntu3.13 is t o be installed
    E: Broken packages

    Any help :S

  14. Guillaume Plessis

    @Colin : Ubuntu should be compatible but it is not supported by Dotdeb.

    Try to upgrade your machine to a recent Ubuntu release (your libc6 package seems pretty old) and try to reinstall php5-cli from Dotdeb to satisfy the dependencies, but once again, compatibility is not garanted.

  15. Colin Lundy

    @Gauillaume: thank you for your reply, I am very very new to Linux. Would you be able to email me with a walk-thru kinda thing??

  16. Craig

    Is there a special reason why this version of PHP was compiled with –enable-sigchild because this wreaks havok in many apps that use proc_close() because it now always returns -1? I’m now in the process of making working arounds for several scripts because of this.


    –enable-sigchild is only relevent to users of Oracle who are having processes, and the standard Debian package doesn’t have it set.

  17. Guillaume Plessis

    @Craig : sigchild is an historic feature. I think I’ll remove it in my next upload, because it broke many scripts (pecl and pear, for example). Thanks for this feedback.

  18. Craig

    @Guillaume Plessis: Thanks, I can’t wait. B.t.w. your blog doesn’t seem to handle escaping of gt and lt html entities because in my last sentence was meant to be “having [defunct] processes” (with gt and lt instead of []).

  19. Guillaume Plessis

    @Craig : you can build your own packages by adding Dotdeb’s deb-src entriy in your sources.list and launch :

    apt-get update
    apt-get build-dep php5
    apt-get source -b php5

  20. Robert Rauchstaedt

    Hi Guillaume Plessis,

    I’ve got a problem with compiling 5.2.9 on a Debian Lenny running on PowerPC.
    While trying to build the packages it stops while applying the suhosin patch:

    Applying patch 011-suhosin.patch
    patching file TSRM/TSRM.h

    patching file Zend/zend_llist.c
    can’t find file to patch at input line 1413
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    |diff -Nura php-5.2.9/configure suhosin-patch-5.2.9-0.9.7/configure
    |— php-5.2.9/configure 2009-02-25 16:39:40.000000000 +0100
    |+++ suhosin-patch-5.2.9-0.9.7/configure 2009-03-05 21:11:35.000000000 +0100
    No file to patch. Skipping patch.
    3 out of 3 hunks ignored
    patching file

    patching file main/main.c
    Hunk #2 succeeded at 1378 (offset 1 line).
    Hunk #3 succeeded at 1419 (offset 1 line).
    Hunk #4 succeeded at 1516 (offset 1 line).
    Hunk #5 succeeded at 1678 (offset 1 line).
    Hunk #6 succeeded at 1822 (offset 1 line).
    Hunk #7 succeeded at 1875 (offset 1 line).
    Hunk #8 succeeded at 1936 (offset 1 line).
    patching file main/php.h
    can’t find file to patch at input line 1780
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    |diff -Nura php-5.2.9/main/ suhosin-patch-5.2.9-0.9.7/main/
    |— php-5.2.9/main/ 2009-02-25 16:39:45.000000000 +0100
    |+++ suhosin-patch-5.2.9-0.9.7/main/ 2009-03-05 21:11:35.000000000 +0100
    No file to patch. Skipping patch.
    1 out of 1 hunk ignored
    patching file main/php_logos.c

    patching file win32/build/config.w32
    Patch 011-suhosin.patch does not apply (enforce with -f)
    make: *** [debian/stamp-patched] Error 1
    dpkg-buildpackage: failure: debian/rules build gave error exit status 2
    Build command ‘cd php5-5.2.9 && dpkg-buildpackage -b -uc’ failed.
    E: Child process failed

    If I remove the the suhosin patch from the “series” and removing the –with-suhosin the rules everything works.

    Do you have an idea what the cause of the problem could be?



  21. Guillaume Plessis

    @Robert : Try to do this…

    apt-get source php5
    cd php5-5.2.9
    ./debian/rules binary

    If it does not work, retry, but edit debian/rules before launching it, and replace this line

    rm -f configure aclocal.m4 config.sub config.guess


    rm -f aclocal.m4 config.sub config.guess

  22. OverlordQ

    I got the same error, tried what you said and I noticed:

    configure: WARNING: unrecognized options: –enable-memory-limit, –enable-suhosin, –enable-track-vars, –enable-trans-sid, –enable-filepro, –with-dom, –enable-yp, –enable-dbx

  23. Robert Rauchstaedt

    @Guillaume Plessis: This works (./debian/rules binary). Thanks.

  24. Polk

    on Debian Lenny I had PHP 5.2.6 with CGI and FastCGI.
    After upgrading to PHP 5.2.9-0.dotdeb.1 CGI works, but FastCGI stopped working. I’m a newb. Any ideas what could I miss?

  25. Vide

    Hi Guillaume,

    can you tell if you are planning to release a 5.2.9-1 when this bug is officially fixed upstream?

    (yeah, I’m affected by this memleak ๐Ÿ™
    I’m asking cause I don’t know your policies for minor releases

  26. OverlordQ

    One last question, any chance of compiling against a current version of libxml2?

  27. Guillaume Plessis

    @OverlordQ : No, libxml2 is a core library for many and many programs. Backporting it would force me to fix too much potential issues with Lenny binaries, that’s too much work for me. Sorry.

  28. Guillaume Plessis

    @Joel : Dotdeb is not made for Ubuntu. Two solutions :
    – Rebuild the packages using apt-get source -b php5
    – Add the Debian Lenny related line in your sources.list to provide libmagick10 :
    deb stable main contrib non-free

    No more support can be provided for Dotdeb Ubuntu, you have to be tricky ๐Ÿ™‚

  29. Joel

    Thanks. Who would of guess that Dotdeb is not made for ubuntu? ๐Ÿ™‚

    No need to rebuild the packages. That repository did it.

  30. Jean-Michel

    I don’t know if it is related to this version of PHP. I have installed PHP 5.2.9 and when I launch Apache I have this warning in the PHP error log :
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20060613/’ – /usr/lib/php5/20060613/: cannot read file data: Is a directory in Unknown on line 0

    Since I have a strange error with the library Zend_DB (from Zend Framework) I wonder if this could be the cause.

    Do you know how I can fix this path issue ? I have not found the ‘/usr/lib/php5/20060613/’ in the config files.

  31. Sรฉbastien

    I need some advise with this package, I’m using ubuntu 8.10 which does not have /usr/lib/php5/build/libtool.m4 and /usr/lib/php5/build/ that are pointing to a non existing symlink in ../../../share/libtool/
    Replacing the symlink
    with sudo ln -s ../../../share/libtool/config/ and sudo ln -s ../../../share/aclocal/libtool.m4 libtool.m4
    But this lead to issue with phpize:
    error: possibly undefined macro: m4_ifval
    and the impossibility to build pecl package.

    Any idea?

  32. Guillaume Plessis

    @Jean-Michel : This is caused by a wrong call to the dynamic extension loader dl(). An extension name should be provided as argument.The available extensions are listed in /usr/lib/php5/20060613/

    @Sรฉbastien : This is a compatibility problem of Ubuntu against Dotdeb. I advise you to rebuild the whole dotdeb packages against your distribution and especially your development tools : m4, libc6-dev…

    Tip : apt-get source -b php5

  33. Jean-Michel

    Thanks Guillaunme. I don’t know where this wrong call is issued but it doesn’t seem a real issue anyway.

  34. aseire

    I am “just” trying to upgrade from PHP Version 5.2.6-1+lenny3 to PHP Version 5.2.9+lenny3

    I have updated the sources list to add my local (US) mirrors. However, when I do an “apt-get update” I get this scary “packages cannot be authenticated” warning:

    WARNING: The following packages cannot be authenticated!
    php5-mysql libapache2-mod-php5 php5-common mysql-common php5
    Install these packages without verification [y/N]? N

    I see people doing an “apt-get install debian-archive-keyring” before a “apt-get update” but that seems weird to me.

    I did an “apt-key update” and got no changes so, I have the latest keys.

    What am I doing wrong here please?

  35. aseire

    Synaptic gives an installed PHP Version 5.2.6-1+lenny3 (upgradable) to 5.2.11 which I would be happy with. However, if I do try and upgrade, this time using Synaptic instead of apt-get, I still get the scary “WARNING: The following packages cannot be authenticated!”

    What am I doing wrong here please?

    El Thicko……..

  36. Guillaume Plessis

    @aseire : You’re not doing anything wrong. The cause of this warning is that Dotdeb packages are not GPG-signed. I’ll work on this, but you have to answer “yes” to this warning.

  37. nikmah

    what shold i d o?help me please…….

    apt-get install mysql-server
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following extra packages will be installed:
    libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl
    mysql-client-5.0 mysql-server-5.0
    Suggested packages:
    dbishell libcompress-zlib-perl mysql-doc-5.0 tinyca
    Recommended packages:
    libhtml-template-perl mailx
    The following NEW packages will be installed:
    libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl
    mysql-client-5.0 mysql-server mysql-server-5.0
    0 upgraded, 7 newly installed, 0 to remove and 409 not upgraded.
    Need to get 27.5MB/36.3MB of archives.
    After this operation, 107MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    WARNING: The following packages cannot be authenticated!
    libnet-daemon-perl libplrpc-perl libdbi-perl libdbd-mysql-perl
    mysql-client-5.0 mysql-server-5.0 mysql-server
    Install these packages without verification [y/N]?


  1.  Void.
  2.  Where can I find the gpg key for