Posted by & filed under PHP.

On August 28th, the PHP group released the first stable version of the new major branch, PHP 5.6.0 :

The PHP Development Team announces the immediate availability of PHP 5.6.0. This new version comes with new features, some backward incompatible changes and many improvements.

The main features of PHP 5.6.0 include:

For a full list of new features, you may read the new features chapter of the migration guide.

PHP 5.6.0 also introduces changes that affect compatibility:

  • Array keys won’t be overwritten when defining an array as a property of a class via an array literal.
  • json_decode() is more strict in JSON syntax parsing.
  • Stream wrappers now verify peer certificates and host names by default when using SSL/TLS.
  • GMP resources are now objects.
  • Mcrypt functions now require valid keys and IVs.

On the Dotdeb side now, I wanted to make things right, so I spent my last 3 week-ends changing what happens under the hood :

  • First, syncing the packaging method to Sid’s one. Thanks to the Debian maintainers for their awesome work!
  • The main PHP 5.6 packages are now built using git-buildpackage.
  • The PECL extensions are now built using pkg-php-tools and a modified version of debpear. More info here… (Meaning that you could soon be able to easily package your own extensions).

Therefore, I’m now proud to announce that :

  • Packages of PHP 5.6.0 are now available for Debian 7 “Wheezy” on amd64 and i386 architectures
  • PECL extensions now have their own version numbers to reflect what really happens on pecl.php.net. The upgrade from previous versions of PHP should be seamless.
  • The brand new PHP debugger, phpdbg is available through its dedicated package : php5-phpdbg
  • msgpack support is now available by installing php5-msgpack
  • Pthreads support is now available by installing php5-pthreads
  • php5-http from previous versions of PHP has been updated and renamed php5-pecl-http, according to Debian’s guidelines

Of course, there are still points to be worked on :

  • Regression : php5-memcached lacks JSON support
  • Improvement : igbinary to be supported in PHP 5.6 (php5-igbinary), in php5-memcached and in php5-redis. As well as msgpack in php5-memcached
  • Missing packages : Xdebug and Xhprof are missing for now
  • End of support : Spplus won’t be supported anymore. Xcache’s and Pinba’s fates haven’t been decided yet

Considering this, these first packages should be seen as a preview :

  • Don’t upgrade critical/production environments yet, or at your own risk!
  • For users upgrading from PHP 5.5, a full migration guide is available, detailing the changes between 5.5 and 5.6.0
  • The full list of changes is available in the ChangeLog
  • Make sure that you understand the above PHP/Debian/Dotdeb changes and that you don’t need any of the missing features
  • Your feedbacks are always welcome. Just make sure they are useful.

To install PHP 5.6 or to upgrade from previous version just follow the instructions.

I hope you’ll enjoy this new major version of PHP. And as usual, feel free to show your support πŸ™‚

45 Responses to “PHP 5.6.0 packages for Wheezy”

  1. TheDarkITA

    After update I have this error:
    service php5-fpm restart

    [….] Restarting PHP5 FastCGI Process Manager: php5-fpm
    Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20131226-zts/readline.so’ – /usr/lib/php5/20131226-zts/readline.so: cannot open shared object file: No such file or directory in Unknown on line 0
    . ok

    How to fix it?

  2. TheDarkITA

    Sure!

    Debian 7 amd64
    php 5.6
    php-fpm

    deb http://debian.mirrors.ovh.net/debian/ wheezy main
    deb-src http://debian.mirrors.ovh.net/debian/ wheezy main
    deb http://security.debian.org/ wheezy/updates main
    deb-src http://security.debian.org/ wheezy/updates main
    deb http://packages.dotdeb.org wheezy all
    deb-src http://packages.dotdeb.org wheezy all
    deb http://packages.dotdeb.org wheezy-php56 all
    deb-src http://packages.dotdeb.org wheezy-php56 all

    dpkg -l ‘php*’ | grep ‘^.i’
    ii php5-cli 5.6.0-1~dotdeb.1 amd64 command-line interpreter for the php5 scripting language
    ii php5-common 5.6.0-1~dotdeb.1 amd64 Common files for packages built from the php5 source
    ii php5-curl 5.6.0-1~dotdeb.1 amd64 CURL module for php5
    ii php5-fpm 5.6.0-1~dotdeb.1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
    ii php5-gd 5.6.0-1~dotdeb.1 amd64 GD module for php5
    ii php5-mcrypt 5.6.0-1~dotdeb.1 amd64 MCrypt module for php5
    ii php5-mysql 5.6.0-1~dotdeb.1 amd64 MySQL module for php5
    ii php5-readline 5.6.0-1~dotdeb.1 amd64 Readline module for php5
    ii phpmyadmin 4:3.4.11.1-2+deb7u1 all MySQL web administration tool

  3. TheDarkITA

    readline.so not found

    ls /usr/lib/php5/20131226-zts/

    curl.so gd.so mcrypt.so mysqli.so mysql.so opcache.so pdo_mysql.so pdo.so

  4. TheDarkITA

    Yes I install php 5.6 before announcement.
    Now work fine with apt-get install –reinstall php5-readline
    Thank you πŸ˜€

  5. Guillaume Plessis

    @TheDarkITA : the problem was that I updated the core package without changing their version number, while adding ZTS support (=> extension_dir has changed).

    Sorry for that, if the issue occurs with other extensions, you know the fix πŸ™‚

  6. Мимо ΠΏΡ€ΠΎΡ…ΠΎΠ΄ΠΈΠ»

    Error:
    initctl: Unknown job: php5-fpm
    OS-Debian 7 x64

  7. TheDarkITA

    I have another problem:

    mysqli_connect(): Headers and client library minor version mismatch. Headers:50538 Library:50619

    I tryed to do: apt-get instal –reinstall php5-mysql
    But It still generate that error. Can it depends from another package?

  8. Alexander

    Lack of xdebug is rather strange decision. One the most important extensions.

  9. Guillaume Plessis

    Don’t worry : It’s missing, but it’s also being worked on, I know that it’s important for many users. That’s why I asked to consider these packages as preview.

  10. Janusz

    Thanks, awesome job, but have some issue with gzopen:

    PHP Fatal error: Call to undefined function gzopen()

    although phpinfo says:
    ZLib Version 1.2.7

  11. Janusz

    i368. It’s a virtual machine with:
    Linux devhost 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686 GNU/Linux

  12. Michael

    # php
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20131226-zts/pecl.so’ – /usr/lib/php5/20131226-zts/pecl.so: cannot open shared object file: No such file or directory in Unknown on line 0

    # cat /etc/php5/mods-available/pecl.ini
    extension=pecl.so

    # dpkg -S /etc/php5/mods-available/pecl.ini
    php5-pecl-http: /etc/php5/mods-available/pecl.ini

    # dpkg -L php5-pecl-http | grep pecl.so
    #

    Where do I find pecl.so?

  13. Janusz

    @Michel check version of php5-dev package. Should be:
    dpkg -l | grep php5-dev
    ii php5-dev 5.6.0-1~dotdeb.1 i386 Files for PHP5 module development

    and then reinstall pecl

  14. Michael

    There’s no php5-dev package and honestly I don’t want one as it pulls a lot of other packages as dependencies.

  15. Michael

    Yes, that helped. Thank you!
    One more thing, http.so must be loaded after raphf.so to work. Otherwise it results in /usr/lib/php5/20131226-zts/http.so: undefined symbol: php_persistent_handle_abandon

  16. Dmitry Bergstein

    php5-ssh2 package seems broken.

    PHP looking in /usr/lib/php5/20131226/
    But package from php5.6 directory, point to /usr/lib/php5/20131226-zts/ssh2.so

  17. Guillaume Plessis

    @Dmitry Bergstein : that’s because you installed PHP 5.6 packages when PECL packages weren’t available yet. The extension_dir has changed since then – I added thread safety. Sorry for this issue.

    One way to solve this problem is to run “apt-get update ; apt-get install –reinstall php5-cli”, for example. You can do it for any SAPI you want to use.

  18. Ezekiel

    After upgrade php5.6 the zend opcache give segm fault in my server . php are slow on my server now πŸ™ i must desactivate zend opcache

    debian 7 amd64 php5.5 upgrade 5.6

  19. Bas

    +1 from me for XDebug as well. Can’t do without it.

    Great work, was really looking forward to this! For now I will have some fun checking out the new functionality. πŸ™‚

    Your efforts are much appreciated!

  20. Thomas

    Comment out line 9 of /etc/init/php5-fpm.conf. Seems wheezy’s upstart doesn’t support the reload signal stanza.

  21. Tim

    Forgive me, I have this exact issue but which file am I looking at to re-order the load order of http.so and raph.so please? Many thanks in advance.

  22. Tim

    Thanks for the quick response! However, I appear not to have an http.ini file to physically change…

  23. Tim

    Thanks again for your help. Although within pecl.ini I only have one line:

    extension=http.so

    Should I just add this line:
    priority=21

    …to it?

  24. Tim

    I’ve done exactly as you said but now I get the error:

    PHP Warning: Module ‘raphf’ already loaded in Unknown on line 0
    PHP Warning: Module ‘http’ already loaded in Unknown on line 0
    PHP Warning: Module ‘http’ already loaded in Unknown on line 0

  25. Tim

    Michael, you were exactly right, I had inadvertently added extra .ini files in /conf.d when trying different priority numbers(!) and this was the issue. All sorted now.

    Many thanks for all your help, very much appreciated!