Categories
PHP

PHP 5.3.0-final preview packages available for Debian Lenny

The official announce of PHP 5.3.0

Read carefully this announce from PHP.net and its links :

The PHP development team is proud to announce the immediate release of PHP 5.3.0. This release is a major improvement in the 5.X series, which includes a large number of new features and bug fixes.

Some of the key new features include: namespaceslate static bindingclosures, optional garbage collection for cyclic references, new extensions (like ext/phar,ext/intl and ext/fileinfo), over 140 bug fixes and much more.

For users upgrading from PHP 5.2 there is a migration guide available here, detailing the changes between those releases and PHP 5.3.0.

Further details about the PHP 5.3.0 release can be found in the release announcement, and the full list of changes are available in the ChangeLog.

This is a great news and a big step for PHP, that gets cleaner and speedier (for example, read this benchmark of ezPublish performance boost with PHP 5.3.0).

In my (sysadmin) opinion, the best features are :

  • ext/phar to bundle complete application in an archive
  • MySQL native driver that avoid the libmysqlclient dependency, increases the overall performances and adds great features (real persistance, asynchronous queries)
  • dirty and unsafe features (register_globals, safe_mode, magic_quotes*) removal

The elePHPants march
The elePHPants march (credit : DragonBe)

Be careful!

Depending of your applications, PHP 5.3 may not be fully compatible with 5.2 out of the box :

  • many and many fonctions and features are deprecated or changed
  • some extensions (ming, ncurses…) moved to PECL, others (mime_magic, mhash) are just emulated
  • some bugs still exists and should be fixed with PHP 5.3.1

For example, I experienced some strange behaviour with WordPress, Sweetcron or Roundcube and I had to patch them.

Please read the migration guide very carefully before going further!

What are the changes from Dotdeb?

Ok, now that you read the Changelog and the migration guide, now that you know how to modify your script to migrate to PHP 5.3, you have to be aware of some changes introduced by Dotdeb and their consequences :

  • The migration from libmysqlclient to MySQL native driver is great in terms of performance and memory but have one restriction : it necessitates the use of MySQL 4.1’s newer 41-byte password format. Continued use of the old 16-byte passwords will cause mysql_connect() and similar functions to emit the error, “mysqlnd cannot connect to MySQL 4.1+ using old authentication.”. Please check your MySQL passwords in mysql.user before upgrading!
  • The mail_extra_headers that allowed to insert the script’s name in the sent mails has been included in the core of PHP and the ini variable is now mail.x_header
  • php5-mhash, since its functions are emulated by ext/hash , disappeared and is now included in the core of PHP.
  • php5-ming moved to PECL and is not packaged anymore
  • The Suhosin patch and the associated extension are not available yet (that’s what justifies the preview status)
  • All the PECL extension are not built yet. They will be as soon as the preview phase is over.
  • Enchant support has been included as bonus feature 🙂

How to install?

As they’re just preview packages, the PHP 5.3.0-final ones are still on a separate repository. To install them, just add these temporary entries in your /etc/apt/sources.list.

deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all

Now launch your favorite commands (apt-get update && apt-get upgrade) to upgrade your box and enjoy!

For your information, I do NOT intend to publish PHP>=5.3.0 packages for Debian Etch, it would mean too much work to get clean packages… PHP 5.2.10 (once fixed) will be last version available for Etch from Dotdeb. Then, you’re strongly encouraged to migrate to Debian Lenny if you want to take profit from 5.3.0.

Last but not least : thank you!

Thanks for using Dotdeb, for your useful reports and for your suggestions. Altough I’m doing my best to bring you the best new features of PHP the stable way, my work is not perfect and your help is really appreciated when things go bad.

88 replies on “PHP 5.3.0-final preview packages available for Debian Lenny”

So, no matter *WHAT* I do, I cannot install these packages because of dependencies that probably don’t matter anyway! How can I override this without removing all the problematic packages?

php5-xsl: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-sqlite: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-snmp: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-gd: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-curl: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-pspell: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-xmlrpc: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-mcrypt: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-mysql: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.
php5-cli: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny3) but 5.3.0-0.dotdeb.6 is to be installed.

The following packages will be REMOVED:
libmhash2{u} php5-mhash{a}

I wonder if upgrading to this version is even worth it. If the php developers can’t be backwards compatible it makes it tough on us admin to keep with the changes.

I may just prevent 5.3 from being mirrored if that is the case.

trying to install 5.3 on my ubuntu 9.04 server machien, but errors occur:

root@ubuntu:~# apt-get install php5-dev
Reading package lists… Done
Building dependency tree
Reading state information… 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.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php5-dev: Conflicts: libtool (>= 2.2) but 2.2.6a-1ubuntu1 is to be installed
E: Broken packages

When i try to install the php5-dev, it tell me that i must uninstall the gnome-common first loooooooooool

i was not able to install the .deb, i just compile it from php.net

btw, thanks ^^

@Perberos : installing gnome-common may be, in your case, a nth-level dependency caused by a non-strict package choice. Are you using Debian Lenny? All other are not supported.

I had the same problem in Ubuntu with libtool. If you have libtool installed already, remove it, then grab the 1.5.26-1ubuntu1 deb from hardy and install it manually. That resolves the libtool problem for php5-dev.

For those of you using PDO, it’s worth noting that when using a socket to connect to mysql, the parameter should be “unix_socket” (was only “socket” before).

Another weird behaviour… apache vhost defines date.timezone:

php_value date.timezone “Europe/Paris”

and PHP randomly throws warnings:

[Fri Jul 10 02:06:21 2009] [error] [client 123.125.64.38] PHP Warning: include(): open_basedir restriction in effect. File(/home/mickael/v2.desfrenes.com/trunk/bootstrap.php) is not within the allowed path(s): (Europe/Paris) in /home/mickael/v2.desfrenes.com/trunk/docroot/index.php on line 4

How can date.timezone be used as a path for open_basedir ? O_ô

@desfresnes : How did you define your vhost? In a plaintext file or using a mass-virtual-hosting backend (mod_vhs or so on…)?

I had this issue with mod_vhs, showing bad memory allocation but I didn’t have time to debug it yet. It seems that the changes in open_basedir, realpath() and timezone lead to this kind of problem.

I’m still crawling bugs.php.net…

vhost is defined in a plaintext file, in /etc/apache2/sites-available/.

Right now the site is unavailable. I changed nothing and this morning the open_basedir has changed:

sd-14043:/home/mickael# tail -f /var/log/apache2/error.log
[Fri Jul 10 07:33:47 2009] [error] [client 90.62.171.44] PHP Warning: include(): Failed opening ‘../bootstrap.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/mickael/v2.desfrenes.com/trunk/docroot/index.php on line 4

sorry, here’s the open_basedir:

[Fri Jul 10 07:39:59 2009] [error] [client 90.62.171.44] PHP Warning: include(): open_basedir restriction in effect. File(/home/mickael/v2.desfrenes.com/trunk/bootstrap.php) is not within the allowed path(s): (\xe0<\xb5) in /home/mickael/v2.desfrenes.com/trunk/docroot/index.php on line 4

(\xe0<\xb5) ??? not much better than (Europe/Paris)

Is there any chance you can include the embed SAPI in the php5-dev package or create another package for php5-embed.

I can build PHP on my own to get the embed SAPI, but for making the code portable, it would be nice for others to be able to apt-get install php5-embed and them build my app.

Does anybody know when suhosin (patch and extension) will be available for 5.3? Their website is not very verbose; forums are down and I could not find any public repository.

[…] tradities. Een tijd geleden had ik van de eerste keer firefox 3.5 geïnstalleerd, en vandaag php 5.3. Ik ben iemand die graag van vooruitgang houdt, dus probeer ik een beetje te forceren. Scripts die […]

Can anyone confirm any possible issues with debian/ubuntu time zone database. In particular the use of the php function timezone_identifier_list().

Please, add the oldstable version of php 5.3, I cant install on my debian 4:
apt-get install php5-cli

php5-cli: Depends: libc6 (>= 2.7-1) but 2.3.6.ds1-13etch9+b1 is to be installed
Depends: libdb4.6 but it is not installable
Depends: libicu38 (>= 3.8-5) but it is not installable
Depends: libkrb53 (>= 1.6.dfsg.2) but 1.4.4-7etch7 is to be installed
Depends: libncurses5 (>= 5.6+20071006-3) but 5.5-5 is to be installed
Depends: libssl0.9.8 (>= 0.9.8f-5) but 0.9.8c-4etch5 is to be installed
Depends: libxml2 (>= 2.6.28) but 2.6.27.dfsg-6 is to be installed
Depends: php5-common (= 5.3.0-0.dotdeb.6) but 5.2.8-0.dotdeb.1 is to be installed
E: Broken packages

Even after doing the suggested update/upgrade I’m still presented with a bunch of solutions, most involve removing PHP. The least egregious is:

The following packages have been kept back:
php-pear php5-dev

The following NEW packages will be installed:
libicu38{a}

The following packages will be REMOVED:
djvulibre-desktop{u} ghostscript{u} gs-common{u} gsfonts{u} libcroco3{u} libcupsimage2{u} libdjvulibre21{u} libgd2-xpm{u} libgraphviz4{u}
libgs8{u} libgsf-1-114{u} libgsf-1-common{u} libilmbase6{u} libjasper1{u} libmagick10{u} libmhash2{u} libopenexr6{u} libpaper-utils{u}
libpaper1{u} librsvg2-2{u} libwmf0.2-7{u} php5-imagick{a} php5-memcache{a} php5-mhash{a} psfontmgr{u}
The following packages will be upgraded:
libapache2-mod-php5 php5 php5-cli php5-common php5-curl php5-gd php5-mcrypt php5-mysql php5-pspell php5-snmp php5-sqlite php5-xmlrpc php5-xsl

How can I just upgrade PHP and ignore the dependencies?

@Austin B. : Please use a tool such as dselect or aptitude to know which dependency causes these removals.

About php5-imagick and php5-memcache, they’re not compatible with php 5.2.10 yet. They will be in the final release.
About php5-mhash, it is obsolete because of the incluusion of an emulated mhash in the PHP’s core.

If you really don’t succeed in resolving your dependencies, please send me at gui_at_php_dot_net :
– your /etc/apt/sources.list
– your /etc/debian_version
– a ‘dpkg –get-selections’

Hi

What is the expected release date of the final release?

I’m waiting to install it to new server so it can go to colocation 😉

@Bostjan : if you don’t need the suhosin (patch + extension), install those packages, they’ll fit your needs. They won’t be different from the suhosin-enabled ones.

If not, try to guess the Suhosin patch’s release date.

I’ve recently install php5-xdebug from dotdeb repository. It gave me warning “xdebug must be loaded as a zend extension in unknown on line 0”. It will be nice to update /etc/php/conf.d/xdebug.ini from

extension=xdebug.so

to

zend_extension=’/absolute/path/to/xdebug.so’

Also there was malformed comment before this line.

With best regards,
Sergey Galkin

Regarding Sergey Galkins comment, last line:

PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/memcache.ini on line 1 in Unknown on line 0

PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/suhosin.ini on line 1 in Unknown on line 0

PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/xdebug.ini on line 1 in Unknown on line 0

How to find out which Versions of php5-xcache and/or php5-xdebug are compiled? I.e. Debian Testing already has php5-xcache 1.3.0-1 (xcache 1.3.0 was released Aug. 4th). And this is “newer” than php5-xcache 5.2.10 from dotdeb.
But: How to find out? What about apt(itude) thinking php5-xcache-5.2.10 being newer than php5-xcache-1.3.0-1 from testing?
Is there any chance to change the dotdeb Version Numbering scheme?

@Laph: There’s no way to know the xcache version without installing the package.

I’m thinking about changing the version numbering scheme to reflect the extensions’ version without breaking binary compatibility (xcache for 5.2.10 is not the same as xcache for 5.3.0, for example).

Please update this package! Away with mysqlnd 5.0.5-dev – 081106 – $Revision: 1.3.2.27 $ and hello mysql 5.1.37.

hmm ok, but phpmyadmin say the Server Version: 5.1.37-2 of mysql is newer as the MySQL-Client-Version: mysqlnd 5.0.5-dev – 081106 – $Revision: 1.3.2.27 $

Nice to see those PECL binaries.
Any possibility of also getting Ming 0.4.2 packaged for PHP5.3?

My compliments, nice to see 5.3 already available here!

But… I have some problems upgrading. I use Debian Lenny, all packages updated to the newest versions before adding the php53 sources. I use apache2-mpm-worker (in stead of prefork) because of its threading and better performance, together with DotDeb’s PHP5 via FastCGI. The best performance I’ve ever had…!

But while upgrading via ‘apt-get update && apt-get dist-upgrade’, it asks to REMOVE apache2-mpm-worker and to install apache2-mpm-prefork and libapache2-mod-php5! Of course that’s not what I want…

Did I something wrong? How can I solve this?

php5.3 packages for Debian are not equipped with GD-Lib and the DIO-Lib does not fit.

Unfortunately it’s impossible to remove the package, though one cannot downgrade to original debian 5.2.6- …

please give advice, what to do

Installation of php5-gd was not possible, until I removed ALL PHP-Stuff (excluding the ini-file) from the Host in the following order:

apache2ctl stop
apt-get remove libapache2-mod-php5
apt-get autoremove php5

setting the sources
apt-get update
apt-get upgrade
apt-get install php5
apt-get install php5-gd
apt-get install php5-cli
apt-get install php5-cgi
apache2ctl start

Now the Server is working with PHP Version 5.2.11-0.dotdeb.1 and all the buggy stuff has vanished, missing functions (imagerotate()) are included, etc.

But I had to remove first the old versions!

It seems the php 5.3.0 suhosin patch has been around for a while now. Are we waiting for 5.3.1 now, or will a final 5.3.0 release be made?

Thanks for the response. I’ll look forward to 5.3.1 then. I appreciate your effort and time in providing these packages.

I just installed the PHP 5.3.0 Packages including libapache on a virginal Debian Lenny and got an error message:

apache2: apr_sockaddr_info_get() failed for debian5.3

What’s the reason? Any advice?

Thanks, Tom

Ok ok, it was my falut…

the hostname in /etc/hostname must have a resolution in /etc/hosts

My hostname still was wrong: debian5.3
while the resolution already was set to: debian5.0.3

Now ist works fine. 🙂

This version has a bug:

http://bugs.php.net/bug.php?id=48697&edit=1

I just hit apt-get upgrade and suddenly all my capitalized strings come out funny, took forever to figure out what it was.

If you use parse_str, it will erroneously reset your mb_internal_encoding to ISO-8859-1. If you have code using mbstring functions and the parse_str function you may want to consider this before installing.

So… any chance of a fix for this? 😀

Just curious, can anyone tell me when this package will be available in the dotdeb.org main repository?

Thanks

@Mihia Stancu : I think PHP 5.3 will stay on a separate repository for Lenny as it needs a heavy migration.
It will appear on the main repository for Squeeze as soon as this Debian release is stable.

@greg606 : PHP 5.3.1 packages are building, they should be available later on Monday.
You can use Dotdeb packages on production servers, they’re made for this usage. FYI, they’re deployed on my 600+ servers.

5.3.1 works great php-fpm however does not start.
lugie:/etc/init.d# ./php5-fpm start
Starting php-fpm Error in argument 1, char 1: no argument for option –
Usage: php-fpm [-q] [-h] [-s] [-v] [-i] [-f ]
php-fpm [args…]

Is there a way to easily downgrade back to the distro’s 5.2? I’m on ubuntu hardy and use aptitude. Can I simply remove the sources and update? Or something? (newbie sysadmin, probably just enough to be dangerous.)

[…] Um die aktuellste Version einer Software zu verwenden, muss man diese meist direkt von der Entwicklerseite herunterladen und selbst kompilieren. Das ist nun aber nicht mehr zwingend nötig – zumindest nicht für PHP. Ein Atikel auf Dotdeb beschreibt, wie man die Installation bzw. Update über APT einrichtet. Hier der direkte Link zur Archivseite. […]

Comments are closed.