Categories
PHP

PHP 5.3.3 packages are available

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.

73 replies on “PHP 5.3.3 packages are available”

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?

@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.

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

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.

horde brings up an error, that no imap auth is available, is this an fault with your php packges?

@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.

horde is complaining about a missiong imap_auth extention?
but i read, you have to compile your php5 with –with-imap or something.

sure, i installed horde with plesk! so there should be everything installed , needed by horde including php5-imap

@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.

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

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 🙂

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.

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.

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.

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

@Daniel Hahler

Can you describe step 2 where pid file should be “simulated”. Or how to create these default pid settings.

Thank you

@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

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

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.

@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.

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.

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

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://localhost:8080/2009/06/25/php-5-2-10-packages-for-lennyetch-are-now-available/#comment-2698

@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?

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 ?

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

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 ?

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 all
deb-src http://php53-dotdeb.mirror.borgnet.us stable all

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.

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).

Salut foxmask :o)
Ç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 ?

Wow, I’m currently running Mac OS X 1.0.6.4, and the tips on uncommenting the process managing items actually did the trick.

Thank you very much!

@Guillaume Plessis : Thanks I will try again.

Also when i try to install APC, I could not run phpize. So I apt-get install php5-dev, it prompted

“php5-dev: Depends: libssl-dev but it is not going to be installed
E: Broken packages”.

I then try to apt-get libssl-dev, it prompted

“libssl-dev: Depends: libssl0.9.8 (= 0.9.8g-15+lenny8) but 0.9.8o-2 is to be installed
E: Broken packages”

Anyone know what to do next?

I added 5.3 to the source list and when running aptitude install php5, I run into broken libapache2-mod-php5 package:

The following packages are BROKEN:
libapache2-mod-php5
The following NEW packages will be installed:
php5 php5-common{a}
0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 3035kB of archives. After unpacking 6602kB will be used.
The following packages have unmet dependencies:
libapache2-mod-php5: Depends: apache2-mpm-prefork (> 2.0.52) which is a virtual package. or
apache2-mpm-itk which is a virtual package.
Depends: apache2.2-common which is a virtual package.
Depends: ucf which is a virtual package.

@spirit : php5 is an empty metapackage. Try to install the wanted flavour of php5 directly : php5-cli, php5-cgi, php5-fpm ou libapache2-mod-php5. Which apache-mpm are you using? libapache2-mod-php5 needs prefork or itk. The others are not safe.

TU as l’air francais alors je continue en fr 🙂

en fait je cherche a installer php5-fpm car j’n ai marre de devoir compiler la version 5.2.1X avec le patch…

# aptitude install php5-fpm

Ca me donne:

The following packages are BROKEN:
php5-fpm
The following NEW packages will be installed:
php5-common{a} php5-suhosin{a}
0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 3962kB of archives. After unpacking 9910kB will be used.
The following packages have unmet dependencies:
php5-fpm: Depends: libicu38 (>= 3.8-5) which is a virtual package.
Depends: ucf which is a virtual package.
The following actions will resolve these dependencies:

Keep the following packages at their current version:
php5-fpm [Not Installed]

Score is -9881

Merci de ton aide.

Erf… oublie, j’avais pas vu que mon repo principal était commenté dans le source.list.
Désolé.

Petite question, comment faire pour que lorsque le même package existe dans le repo dotdeb et dans mon repo principal pour qu’il installe celui de dotdeb?

En tous cas bravo pour cette initiative qu’est dotdeb, ca aide bcp 🙂

Thank you. It works now 🙂 The update appeared to have new PHP 5.3.3 Stable so no need for me to remove it.

Does anybody know practical meaning of all this parameters for heavy loaded site ?

pm = dynamic or static
pm.max_children = 128
pm.start_servers = 2
pm.max_spare_servers = 64
pm.max_requests = 0

same question about following parameters:

rlimit_files = 5000
rlimit_core = 0
php_admin_value[memory_limit] = 256M

Any smart boys or girls who is not greedy to share it’s knowledge ? 🙂

So since php5.3.3 now includes php-fpm and is included in Debian squeeze… how would one use nginx and php-fpm with the built-in (not the dotdeb) packages? I found zero info on the fpm support in squeeze so far

Comments are closed.