PHP 5.3.3 packages are available
July 25th, 2010 | by Guillaume Plessis |On july, 22nd, the PHP Group released PHP 5.3.3 :
The PHP development team would like to announce the immediate availability of PHP 5.3.3. This release focuses on improving the stability and security of the PHP 5.3.x branch with over 100 bug fixes, some of which are security related. All users are encouraged to upgrade to this release.
The packages for Debian “Lenny” are now available on Dotdeb on the usual repository.
Of course, you should read the full announcement, the PHP 5.3 migration guide and consult the Changelog.
Caution : (to PHP-FPM users) with the inclusion of PHP-FPM in the PHP 5.3 core, the syntax of the configuration file (/etc/php5/fpm/php5-fpm.conf) has changed. It switched from a XML syntax to an INI one. Please prepare your new configuration file before upgrading, by reading carefully the PHP documentation and this page.
And thanks to Stefan Esser and the Month of PHP security for improving PHP.
45 Responses to “PHP 5.3.3 packages are available”
By Björn on Jul 25, 2010 | Reply
Hello,
is it possible to install the dotdeb 5.2 and 5.3 packages together to switch the Version via PHP CGI?
Has someone try this?
By Guillaume Plessis on Jul 25, 2010 | Reply
@Björn : the PHP 5.2 and PHP 5.3 files are almost the same and the Debian dependencies avoid their both installations on the same instance. You’ll have to split your websites between several servers/VM/chroot to migrate them, sorry. Perhaps a reverse-proxy could help you to do the trick.
By Jean-Christophe Choisy on Jul 25, 2010 | Reply
Hello,
First I’d like to thank you for dotdeb, it’s a blessing for all lenny users, even more-so now that we get php-fpm with a simple aptitude install.
I’ve been wondering, is the php53 repository independent? Can I actually use it without adding the dotdeb one? I don’t use mysql, nor any of the other tools you provide in dotdeb, I just need php53.
Are these packages built against a stock lenny install, or do they actualy depend on some dotdeb packages?
Thanks,
gratefuly yours
By Guillaume Plessis on Jul 25, 2010 | Reply
All the Dotdeb packages are built on a stock Debian Lenny to be the most independant on each other as possible.
Then you can use only the php53 repository.
Once this repository has been merged with the main one (on Squeeze release?), you could use apt-pinning to avoid the installation of unwanted Dotdeb packages.
By Tyrael on Jul 25, 2010 | Reply
For running multiple concurent php versions I suggest you to use phpfarm:
http://cweiske.de/tagebuch/Introducing%20phpfarm.htm
Tyrael
By easteregg on Jul 26, 2010 | Reply
horde brings up an error, that no imap auth is available, is this an fault with your php packges?
By Guillaume Plessis on Jul 26, 2010 | Reply
@easteregg : I can’t say without any further info (error message, log, server config…). I run many webmails without any issue.
Please consult your logfiles, the PHP Changelog, the PHP doc to know if something changed in PHP 5.3.3. On the Dotdeb side, nothing changed between 5.3.2 and 5.3.3.
By easteregg on Jul 26, 2010 | Reply
horde is complaining about a missiong imap_auth extention?
but i read, you have to compile your php5 with –with-imap or something.
By Guillaume Plessis on Jul 26, 2010 | Reply
@easteregg : did you install the php5-imap package and did you check that your horde installation does not miss any library or any prerequisite?
By easteregg on Jul 26, 2010 | Reply
sure, i installed horde with plesk! so there should be everything installed , needed by horde including php5-imap
By Guillaume Plessis on Jul 26, 2010 | Reply
@easteregg : I checked that the php5-imap has the same features as before. It sounds like you’ll have to leave plesk, dive into the guts of your system (console, logs and so on…) to see what is missing (a webserver restart, a horde or pear library…). Perhaps you’ll have to check the Horde/IMP/Plesk forums to see if someone has the same issue.
By easteregg on Jul 26, 2010 | Reply
i couldnt find anything in the logs, thats the point
By Matt on Jul 26, 2010 | Reply
Hi there, and thanks for new update
But actually I have a problem with php-fpm… I use Ubuntu 9.10, and I’ve updated new packages from yours repo today, and php-fpm doesn’t work since that (worked well before). The problem appears as below:
”
Starting php5-fpm Jul 26 19:06:28.664731 [ALERT] [pool www] pm.min_spare_servers(0) must be a positive value
Jul 26 19:06:28.664778 [ERROR] failed to post process the configuration failed
”
when I’m trying to start a php-fpm.
Here is my php version:
“PHP 5.3.3-0.dotdeb.0 with Suhosin-Patch (cli) (built: Jul 24 2010 01:12:50)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH”
My config file is already an INI format, and the value for “min_spare_servers” variable is set to positive number, I mean “5″ (didn’t edit the config).
So.. does anyone can tell me what is the problem?
Thanks, Matt
By Matt on Jul 26, 2010 | Reply
It’s my again – sorry for response to myself
Hmm, the problem seems to be resolved now.. php-fpm working fine.. and i just went to shop for some beers, and when i came back my website woke up
By Daniel Hahler on Jul 27, 2010 | Reply
Matt, your site probably did not start working with the new php-fpm, without you having fixed the ini.
Here are my observations:
1. There should be a default for pm.min_spare_servers / pm.max_spare_servers (5 and 35 is used in comments in the default ini).
This default can be provided in the default ini (just uncomment the lines), or hardcoded in php-fpm itself.
Otherwise, the ini won’t work out of the box, resulting in errors like:
This prevents:
[ALERT] [pool www] pm.min_spare_servers(0) must be a positive value
[ERROR] failed to post process the configuration
WORKAROUND: define
2. Similar to 1., there’s no default for the “pid” setting (which refers to the PID file).
Without this, the whole init script is rather useless, because it relies on the PID file.
So, please enable the “pid” setting via default conf.
3. A problem with the init script:
Graceful shutdown/restart fails when the process mentioned in the pid file does not exist.
(You could simulate this with “pid” not being set in conf, see 2. above).
Example output for 3.:
# invoke-rc.d php5-fpm restart
Gracefully shutting down php5-fpm kill: 138: No such process
…………………………….. failed. Use force-exit
Starting php5-fpm Jul xx xx:xx:02.932275 [ALERT] [pool www] pm.max_spare_servers(0) must be a positive value
Jul xx xx:xx:02.932335 [ERROR] failed to post process the configuration
failed
invoke-rc.d: initscript php5-fpm, action “restart” failed.
Once 1. and 2. are solved / worked around / configured, it works great.
Thanks a lot.
By Guillaume Plessis on Jul 27, 2010 | Reply
@Daniel Hahler : thanks for this precious feedback. Yes, all the process management values have to be explicitely defined.
By Daniel Hahler on Jul 27, 2010 | Reply
Yes, I know that they have to be defined, but I consider this to be uncomfortable and hope that all three mentioned issues get fixed in the next upload:
instead of providing the defaults as comments, why not just provide them as actual settings.
Especially with “pid” this is very much required (otherwise the init script will not work properly).
Thinking about it, the init script should parse php5-fpm.conf for the “pid” setting and use this, while aborting/warning if it is not setup; but it would be setup by default.
By Niels on Jul 28, 2010 | Reply
Thanks for the Update!
I’m struggling with PHP 5.3.3 on Ubuntu 10.04. Seems the automatic update didn’t install libapache2-mod-php5. Once I’ve try to manually install it apt complains about missing libicu38 and libkrb53.
It’s my personal development machine. So currently it’s not a big deal that it’s not working. Would be nice if someone knew how to fix this.
By Guillaume Plessis on Jul 28, 2010 | Reply
@Niels : Ubuntu is not supported by Dotdeb. But it works, with some workaround. For example :
http://blog.jmoz.co.uk/post/435401471/install-php-5-3-on-ubuntu-karmic-koala-from-dotdeb
By Niels on Jul 28, 2010 | Reply
Thanks for the link Guillaume!
By Daniel Hahler on Jul 29, 2010 | Reply
@Guillaume: do you have received my debdiff patch for the issues I’ve mentioned? I’ve sent it to the address used in debian/changelog (@php.net).
By Guillaume Plessis on Jul 29, 2010 | Reply
@Daniel Hahler : yes and it’s very nice you sent it to me. I’ll take a look at it as soon as I’m less busy and I’ll upload a new PHP 5.3.3 build.
By Andrew Ellis on Aug 2, 2010 | Reply
Hello,
I am trying to setup a client’s server and went to install PHP 5.3.3 and, using the US mirror, it installed PHP 5.2.14… Any idea why apt-get install php5 pulled the old version?
Regards,
Andrew
By Guillaume Plessis on Aug 2, 2010 | Reply
@Andrew Ellis : according to the instructions (http://www.dotdeb.org/instructions/), you have to use this separate repository : http://php53.dotdeb.org/
By Sergey on Aug 3, 2010 | Reply
@Daniel Hahler
Can you describe step 2 where pid file should be “simulated”. Or how to create these default pid settings.
Thank you
By Sergey on Aug 3, 2010 | Reply
Where to get this (php5-fpm.pid) ?
By Guillaume Plessis on Aug 3, 2010 | Reply
@Sergey : the pidfile is /var/run/php5-fpm.pid, is defined in /etc/init.d/php5-fpm and will be treated as a variable from /etc/php5/fpm/php5-fpm.conf in the next release of the Dotdeb package of PHP 5.3
By Sergey on Aug 3, 2010 | Reply
Does it mean that the current package of PHP 5.3.3 from dotdeb is not functional to use with FPM ?
>By Guillaume Plessis on Aug 3, 2010 | Reply
>@Sergey : the pidfile is /var/run/php5-fpm.pid, >is defined in /etc/init.d/php5-fpm and will be >treated as a variable from /etc/php5/fpm/php5->fpm.conf in the next release of the >Dotdeb package of PHP 5.3
By Guillaume Plessis on Aug 3, 2010 | Reply
@Sergey : it works like a charm. You just can’t configure the path to the pid file.
By Sergey on Aug 3, 2010 | Reply
To configure the path to the file ‘php5-fpm.pid’, you should have this file first. But after installation I’ve made full disk search and was not able to find it anywhere, including following suggested locations
/var/run/php
/etc/php5/fpm
the only file I found was ‘php5-fpm’ in
/etc/init.d/
but without “pid” extension.
By Guillaume Plessis on Aug 3, 2010 | Reply
@Sergey : from my previous comment :
PID file : /var/run/php5-fpm.pid
init script : /etc/init.d/php5-fpm
configuration : /etc/php5/fpm/php5-fpm.conf
Please note that the PID file is created at the first launch of /etc/init.d/php5-fpm. It’s just a simple text file containing the PID of the master php5-fpm process.
By Sergey on Aug 3, 2010 | Reply
Reinstalled it again, uncommented the line:
pid = /var/run/php5-fpm.pid
root@IBM:/etc/apt# aptitude install php5-fpm
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading extended state information
Initialising package states… Done
The following NEW packages will be installed:
php5-common{a} php5-fpm php5-suhosin{a}
0 packages upgraded, 3 newly installed, 0 to remove and 8 not upgraded.
Need to get 0B/4,076kB of archives. After unpacking 10.4MB will be used.
Do you want to continue? [Y/n/?] y
Writing extended state information… Done
Selecting previously deselected package php5-common.
(Reading database … 40058 files and directories currently installed.)
Unpacking php5-common (from …/php5-common_5.3.3-0.dotdeb.0_amd64.deb) …
Selecting previously deselected package php5-fpm.
Unpacking php5-fpm (from …/php5-fpm_5.3.3-0.dotdeb.0_amd64.deb) …
Selecting previously deselected package php5-suhosin.
Unpacking php5-suhosin (from …/php5-suhosin_5.3.3-0.dotdeb.0_amd64.deb) …
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
Processing triggers for man-db …
Setting up php5-common (5.3.3-0.dotdeb.0) …
Setting up php5-fpm (5.3.3-0.dotdeb.0) …
Creating config file /etc/php5/fpm/php.ini with new version
update-alternatives: using /usr/bin/php5-fpm to provide /usr/bin/php-fpm (php-fpm) in auto mode.
Adding system startup for /etc/init.d/php5-fpm …
/etc/rc0.d/K20php5-fpm -> ../init.d/php5-fpm
/etc/rc1.d/K20php5-fpm -> ../init.d/php5-fpm
/etc/rc6.d/K20php5-fpm -> ../init.d/php5-fpm
/etc/rc2.d/S20php5-fpm -> ../init.d/php5-fpm
/etc/rc3.d/S20php5-fpm -> ../init.d/php5-fpm
/etc/rc4.d/S20php5-fpm -> ../init.d/php5-fpm
/etc/rc5.d/S20php5-fpm -> ../init.d/php5-fpm
Setting up php5-suhosin (5.3.3-0.dotdeb.0) …
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reading extended state information
Initialising package states… Done
Writing extended state information… Done
and
/etc/init.d/php5-fpm start
Starting php5-fpm done
Perfect.
Thank you for your time.
By thet on Aug 12, 2010 | Reply
for the new config file to work, i had to set the variables pm.min_spare_servers and pm.max_spare_servers. here’s the diff to the shipped config file:
diff –git a/php5/fpm/php5-fpm.conf b/php5/fpm/php5-fpm.conf
index 2991d64..0d4867b 100644
— a/php5/fpm/php5-fpm.conf
+++ b/php5/fpm/php5-fpm.conf
@@ -138,12 +138,12 @@ pm.max_children = 50
; The desired minimum number of idle server processes.
; Note: Used only when pm is set to ‘dynamic’
; Note: Mandatory when pm is set to ‘dynamic’
-;pm.min_spare_servers = 5
+pm.min_spare_servers = 5
; The desired maximum number of idle server processes.
; Note: Used only when pm is set to ‘dynamic’
; Note: Mandatory when pm is set to ‘dynamic’
-;pm.max_spare_servers = 35
+pm.max_spare_servers = 35
; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
By Daniel Hahler on Aug 12, 2010 | Reply
@thet: yes. You also want to set the “pid” setting.
This is what my (still pending) patch is about.
By Greg on Aug 13, 2010 | Reply
Hi,
I’m experiencing segfault :
[Fri Aug 13 14:34:00 2010] [notice] child pid 30670 exit signal Segmentation fault (11)
with both 5.3.2 and 5.3.3, suhosin patch (but not the extension). I’m using the following modules :
# dpkg -l | grep php5
ii libapache2-mod-php5 5.3.3-0.dotdeb.0 server-side, HTML-embedded scripting languag
ii php5 5.3.3-0.dotdeb.0 server-side, HTML-embedded scripting languag
ii php5-apc 5.3.3-0.dotdeb.0 apc module for php5
ii php5-cgi 5.3.3-0.dotdeb.0 server-side, HTML-embedded scripting languag
ii php5-cli 5.3.3-0.dotdeb.0 command-line interpreter for the php5 script
ii php5-common 5.3.3-0.dotdeb.0 Common files for packages built from the php
ii php5-curl 5.3.3-0.dotdeb.0 CURL module for php5
ii php5-dev 5.3.3-0.dotdeb.0 Files for PHP5 module development
ii php5-gd 5.3.3-0.dotdeb.0 GD module for php5
ii php5-geoip 5.3.3-0.dotdeb.0 geoip module for php5
ii php5-imagick 5.3.3-0.dotdeb.0 imagick module for php5
ii php5-mcrypt 5.3.3-0.dotdeb.0 MCrypt module for php5
ii php5-memcache 5.3.3-0.dotdeb.0 memcache module for php5
ii php5-mysql 5.3.3-0.dotdeb.0 MySQL module for php5
ii php5-xsl 5.3.3-0.dotdeb.0 XSL module for php5
Seems that we are many that have the bug :
http://www.dotdeb.org/2009/06/25/php-5-2-10-packages-for-lennyetch-are-now-available/#comment-2698
By Guillaume Plessis on Aug 14, 2010 | Reply
@Greg :
1. Try to isolate the code that leads to segfaults by logging the Apache PID in the access.log. Tell us when you found it.
2. Could you please give us a link to a phpinfo()? and the list of activated Apache modules too?
3. Are you running a “pure” Debian Lenny?
By Jake Morrison on Aug 17, 2010 | Reply
The segfault seems to be related to openssl duplicate initialization problems with php5-curl and https
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/590639
By Filou on Aug 18, 2010 | Reply
Maybe I’m wrong but instructions are a bit ambigous to me:
“If you want to install PHP 5.3 on your Debian Lenny box, add these two additionnal lines :”
In addition to the 2 previous standard repository lines ? should we have 4 lines or either 2 first OR 2 last ?
By Tyrael on Aug 18, 2010 | Reply
it’s just you.
adding means adding, not replacing.
the php53 repository contains only the php5.3 packages with higher priority, so if you would only add the php53 repo, then you would loose the mysql-server-5.1 for example.
so yes, if you need the php 5.3 packages, then you have to add 4 lines to your sources.list
Tyrael
By Filou on Aug 18, 2010 | Reply
OK thx!
I was trying to figure out why any upgrade commands wont let me upgrade to 5.3.3 but keep me in 5.2.6: i had to remove old APC package and job was done.
Will APC 3.1.4 be release into your package soon ?
By Guillaume Plessis on Aug 19, 2010 | Reply
@Filou : I’ll release APC 3.1.4 with my next PHP 5.3.3 update but I don’t know when, I’m quite busy
By Scott Grayban on Aug 20, 2010 | Reply
BTW people Gui didn’t post it yet but I mirror php5.3 for him.
It is restricted to US/Canada/Mexico IP’s
deb http://php53-dotdeb.mirror.borgnet.us stable alldeb-src http://php53-dotdeb.mirror.borgnet.us stable all
By Greg on Aug 25, 2010 | Reply
Found: it was gettext fault. When I was regenerating .mo files, I got segfault. I change the script to do a write to a tmp file then rename and segfaults go aways.
By foxmask on Aug 30, 2010 | Reply
Hi,
one thing which is disturbing i’ve noticed : now squeeze is frozen and contains php 5.3.2.
When updating from lenny to squeeze, php command line is removed and when trying to reinstall it, debian cant install it, because the lenny used php5.3.3 and now squeeze does not want to update to PHP 5.3.2 (which is normal but frustating).
By Pandark on Sep 1, 2010 | Reply
Salut foxmask
)
Ça ne serait pas le genre de chose que l’on règle avec un petit coup d’apt-pinning, un apt-get -t stable install php5, ou encore un apt-get install php5/stable ?