PHP 5.3.1 packages for Debian “Lenny” : they’re here!
November 30th, 2009 | by Guillaume Plessis |The official announcement
A few days ago, the PHP Group released PHP 5.3.1 :
The PHP development team would like to announce the immediate availability of PHP 5.3.1. This release focuses on improving the stability of the PHP 5.3.x branch with over 100 bug fixes, some of which are security related. All users of PHP are encouraged to upgrade to this release.
Security Enhancements and Fixes in PHP 5.3.1:
- Added “max_file_uploads” INI directive, which can be set to limit the number of file uploads per-request to 20 by default, to prevent possible DOS via temporary file exhaustion.
- Added missing sanity checks around exif processing.
- Fixed a safe_mode bypass in tempnam().
- Fixed a open_basedir bypass in posix_mkfifo().
- Fixed failing safe_mode_include_dir.
Further details about the PHP 5.3.1 release can be found in the release announcement, and the full list of changes are available in the ChangeLog.
The Dotdeb changes
On the Debian side, some changes were made :
- the packages are now patched with the official Suhosin patch.
- beside the apache2, apache2filter, CGI and CLI flavours, the FPM one has now its own dedicated package, named “php5-fpm”. It will allow you to have greater performances and a lot of more features on a CGI-style installation (FYI, an init script, a config file and a nginx config sample are provided).
How to install?
Because migrating from PHP 5.2. to PHP 5.3 can break some applications, here is the Dotdeb release policy :
- PHP 5.2 is still the default branch for Debian Lenny for some weeks/months. PHP 5.3 packages are kept on a separate repository.
- PHP 5.3 will be the default branch for the upcoming Debian Squeeze (mid-2010)
Then , to install PHP 5.3 on your Debian “Lenny” box, just add these two 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.
In case you enjoy this new release, feel free to donate or to take a look at my whishlist… Xmas is coming


67 Responses to “PHP 5.3.1 packages for Debian “Lenny” : they’re here!”
By dotdeb on Nov 30, 2009 | Reply
New on Dotdeb: PHP 5.3.1 packages for Debian “Lenny” : they’re here! http://bit.ly/6DSM2E/
This comment was originally posted on Twitter
By w_a_s_t_e on Nov 30, 2009 | Reply
Allez hop! apt-get upgrade… RT @dotdeb: New on Dotdeb: PHP 5.3.1 packages for Debian “Lenny” : they’re here! http://bit.ly/6DSM2E/
This comment was originally posted on Twitter
By Mclaes on Nov 30, 2009 | Reply
Upgrade went flawless. First thing I noticed is a performance increase of 11%.
By Guillaume Plessis on Nov 30, 2009 | Reply
Great!
By Janis on Nov 30, 2009 | Reply
Thanks, thanks, thanks!
By Daniel on Nov 30, 2009 | Reply
Thanks!
I’m not sure (if it has been in your package before), but /usr/share/xcache/admin appears to went missing in php5-xcache?!
By bc on Nov 30, 2009 | Reply
Does new packages depend on libevent that if available only on testing?
By Guillaume Plessis on Nov 30, 2009 | Reply
@bc : the php5-fpm package depends on libevent, but a backport from Sid is available on the repository.
http://php53.dotdeb.org/dists/lenny/libevent/
By ElGigi on Dec 1, 2009 | Reply
Nice ! Thanks for this update
.
By JAE on Dec 1, 2009 | Reply
I’ve got alot of trouble with the php5-fpm packages.
First it references /usr/local/bin/php-fpm which doesnt exist after installing the package. /usr/bin/php-fpm AND /usr/bin/php5-fpm both exist but dont seem to point to the same file so I dont know whats up with that.
When I’ve fixed the init script php5-fpm complains:
Starting php-fpm PHP: syntax error, unexpected BOOL_TRUE in /etc/php5/fpm/php5-fpm.conf on line 24
I dont understand what is wrong with the xml… Anyway, even trying to start php-fpm with just some commandline options dont seem to work properly. Something is terribly wrong here.
I even tried running a completely new XEN instance of Debian 5 Lenny on Rackspace Cloud – but I get the same errors on that one without any other installations.
By JAE on Dec 1, 2009 | Reply
If I was unclear, I meant that the init script that is provided references /usr/local/bin/php-fpm as the command to run but that does not exist, after fixing that I simply cannot get php5-fpm to run. The previous package on php53.dotdeb.org ran just fine with the old style php-fpm patched php-cgi. So out of the box the init script is broken and afaikt the php-fpm binaries are also broken.
By Nico on Dec 2, 2009 | Reply
Same error here, did you find a solution?
By JAE on Dec 2, 2009 | Reply
Nope, no solution. I guess the php5-fpm in the dotdeb packages arent stable right now. So I’ll wait for an update or if I have to compile my own packages.
By Guillaume Plessis on Dec 2, 2009 | Reply
The packages are “stable”. There only an issue with the new php5-fpm package. I’ll work on it and I’ll provide a fix very soon. Please be patient.
By OverlordQ on Dec 3, 2009 | Reply
Any way to get packages for unstable? Lots of broken dependencies when trying to install.
By Guillaume Plessis on Dec 3, 2009 | Reply
@OverlordQ : Only Lenny & Etch are supported. If you want to build the packages for unstable (and then satisfy most of the dependencies), launch these command after adding the appropriate deb-src entry in your sources.list :
apt-get build-dep php5
apt-get source -b php5
By Marques Johansson on Dec 3, 2009 | Reply
To get Ubuntu Karmic to install these packages I had to manually install these:
http://us.archive.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb53_1.6.dfsg.4~beta1-5ubuntu2_i386.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu38_3.8-6ubuntu0.2_i386.deb
I wish the mirrors were up to date. They’re all stuck at Sep 20, 2009. I’m only getting about 40kB/s
By OverlordQ on Dec 3, 2009 | Reply
# apt-get build-dep php5
The following packages have unmet dependencies:
apache2-prefork-dev: Depends: libaprutil1-dev but it is not going to be installed
so I install them to make it happy:
# aptitude install apache2-prefork-dev libaprutil1-dev
The following NEW packages will be installed:
apache2-prefork-dev apache2-utils{a} apache2.2-bin{a} apache2.2-common{a} libapr1-dev{a}
libaprutil1-dbd-sqlite3{a} libaprutil1-dev libaprutil1-ldap{a} uuid-dev{a}
So I build dep again:
# apt-get build-dep php5
The following packages will be REMOVED:
apache2-prefork-dev libaprutil1-dev libdb4.8-dev
The following NEW packages will be installed:
libdb4.6 libdb4.6-dev
Now let’s build source:
# apt-get source -b php5
dpkg-checkbuilddeps: Unmet build dependencies: apache2-prefork-dev
Any way to tell it to use libdb4.8 so we dont have this circular conflict?
By Guillaume Plessis on Dec 3, 2009 | Reply
@OverlordQ : now that you have the most of the build-dependencies installed or resolved, you can use this method :
apt-get source php5 # without the -b switch
cd php5-5.3.1
./debian/rules binary
By Mark on Dec 4, 2009 | Reply
Hi,
Can I use the php5.3.1 source from dotdeb to build ubuntu 9.10 packages?
If yes, how should I do?
I just try to use the normal build build process, but it just tell me know.
Here comes the output:
1. sudo apt-get source php5
2. sudo apt-get build-deb php5
==> apache2-prefork-dev libaprutil1-dev libdb4.7-dev should remove
==>libdb4.6-dev will add
then … I use
3. sudo dpkg-buildpackage -rfakeroot
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: source package php5
dpkg-buildpackage: source version 5.3.1-0.dotdeb.0
dpkg-buildpackage: source changed by Guillaume Plessis
dpkg-buildpackage: host architecture amd64
dpkg-checkbuilddeps: Unmet build dependencies: apache2-prefork-dev
dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting.
dpkg-buildpackage: warning: (Use -d flag to override.)
Nothing happend
By Guillaume Plessis on Dec 4, 2009 | Reply
@Mark : Use the commands in the comment above… It will skip the build-dependency problems
cd php5-5.3.1
./debian/rules binary
By Mark on Dec 4, 2009 | Reply
Hi Guillaume
Thanks for your help, but there is no luck, I still can not build the php5.3 deb package in Ubunte Karmic
I have to modify the ./debina/control file, and change the libdb4.6-dev to libdev4.7
After that, I still got error messages
====
–with-pgsql=shared,/usr PGSQL_INCLUDE=`pg_config –includedir`
cat: confdefs.h:
../configure: 490: ac_fn_c_try_run: not found
../configure: 490: 5: Bad file descriptor
../configure: 490: :: checking for pthreads_cflags: not found
../configure: 490: 6: Bad file descriptor
../configure: 490: checking for pthreads_cflags… : not found
By Neves on Dec 4, 2009 | Reply
What about fpm fix?
Look if this can help:
http://svn.php.net/repository/php/php-src/branches/PHP_5_3_FPMphp_5_3_fpm
By Guillaume Plessis on Dec 4, 2009 | Reply
@Neves : the update is coming but I have to look at a potential security issue. About FPM, the problem does not come from the patch, but from the packaging.
Packages will certainly be uploaded this week-end, I was quite busy at (future-ex) work these days.
By Pross on Dec 5, 2009 | Reply
Looking forward to the new packages
By Guillaume Plessis on Dec 5, 2009 | Reply
@Pross : they’re building now, some more tests are needed. I just had to fix an open_basedir bypass : http://seclists.org/fulldisclosure/2009/Dec/96
By Pross on Dec 5, 2009 | Reply
Thats great news!
Shame there is no testing branch, i will have to keep checking the repo instead..
By alnr on Dec 9, 2009 | Reply
I got a dep error:
php5-cgi: Depends: libicu38 (>= 3.8-5) which is a virtual package.
I tried apt-get install libicu38: not found.
Then tried apt-get install libicu42 which worked but still get the dep error for php5-cgi.
By alnr on Dec 9, 2009 | Reply
ps, this is on squeeze i386 btw.
By Guillaume Plessis on Dec 9, 2009 | Reply
@alnr : Dotdeb packages are built against Lenny libraries. Squeeze is not supprted although it should work with one of this solution :
* install the dependencies by hand, as for Ubuntu : http://blog.astrumfutura.com/archives/427-Installing-PHP-5.3.1-On-Ubuntu-9.10-Karmic-Koala-With-aptitudeapt-get.html
* rebuild the packages to build them against Squeeze libraries
By loyza on Dec 11, 2009 | Reply
I thing, there is an error in the package. When i try this:
$ php scripts/generate.php
I get this error:
Fatal error: Call to undefined function mb_internal_encoding() in /var/www/myairdeals/app/bootlocal.php on line 18
But when i use the script in web browser through apache everything goes all right.
By Guillaume Plessis on Dec 11, 2009 | Reply
@loyza : Could you please execute a “php -v” ?
What I have :
# php -v
PHP 5.3.1-0.dotdeb.1 with Suhosin-Patch (cli) (built: Dec 5 2009 20:08:29)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
# php -r “if (function_exists(‘mb_internal_encoding’)) echo \”ok\n\”;”
ok
By loyza on Dec 11, 2009 | Reply
you are right, error is in my install.
$ php -v
PHP 5.3.1 (cli) (built: Nov 30 2009 13:44:04)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
By kamazee on Dec 16, 2009 | Reply
Пакетированный PHP 5.3.1: http://bit.ly/7hj0td. Там же php-fpm. Whohoooo!
This comment was originally posted on Twitter
By Dennis on Jan 6, 2010 | Reply
Hoping to get quick help here, thanks. Trying to install php5-curl but wants installation DVD:
# apt-get install php5-curl
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libterm-readkey-perl
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
ca-certificates libcurl3 libssh2-1
The following NEW packages will be installed:
ca-certificates libcurl3 libssh2-1 php5-curl
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/468kB of archives.
After this operation, 1491kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
php5-curl
Install these packages without verification [y/N]? y
Media change: please insert the disc labeled
‘Debian GNU/Linux 5.0.0 _Lenny_ – Official i386 DVD Binary-1 20090214-16:54′
in the drive ‘/cdrom/’ and press enter
Is there any quick workaround to this? This is on remote server we have no access to atm.
By Guillaume Plessis on Jan 6, 2010 | Reply
@Dennis : edit your /etc/apt/sources.list and comment the dvd-related entry. Then launch “apt-get update && apt-get install php5-curl”
By Dennis on Jan 6, 2010 | Reply
@Guillaume – Thank you! Worked like a charm! And happy new year btw
By Nuno Costa on Jan 17, 2010 | Reply
i’m tring install php5-curl but i can’t at this moment upgrade to php 5.3X, so get this error etc. any advice? Thanks a lot.
Err http://packages.dotdeb.org stable/all php5-curl 5.2.9-0.dotdeb.2
404 Not Found
Nuno Costa
By Guillaume Plessis on Jan 17, 2010 | Reply
@Nuno Costa : simply run “apt-get update”
By Nuno Costa on Jan 17, 2010 | Reply
Many thanks is done
By Xeross on Jan 24, 2010 | Reply
Hey,
It seems there’s something wrong with your packages (Or my config) I get a /tmp/mysql.sock not found error.
My mysql’s my.cnf has the correct paths in both server and client headers, and I tried manually setting the paths in php.ini but that didn’t work.
What else can I do ?
Regard, Xeross
By Guillaume Plessis on Jan 24, 2010 | Reply
@Xeross : this happened with the early PHP 5.3.0 packages. It has been fixed with the last packages. Which precise version are you using?
Could you send us a piece of code that can help us reproduce this issue?
By Xeross on Jan 24, 2010 | Reply
@Guillaume: Well giving a piece of code you can test it with might be tricky, it was only appearing when using PDO_MySQL.
Reproduction code is tricky because I’m using Doctrine ORM. However if you download it and simply connect to a database the error should emerge.
For now I’ve switched to a build of 5.3.0 I found that works properly.
And I was running the latest package from your repository afaik.
By Rob on Jan 27, 2010 | Reply
I just installed PHP 5.3.1 from dotdeb on Ubuntu 9.10
The problem is that does not come with PDO_MYSQL Driver.
This is the only reason I can’t use PHP ! I hardly depend on PDO
Please tell me how can I install it ?
I tried PECL and I was able to compile pdo_mysql.so, I put the file in the same pdo.so directory, I added the line “extension=pdo_mysql.so” in pdo.ini file,
but no effect. phpinfo() does not show the driver.
I wonder if this build added support for pdo-mysql
Any idea ?
By Guillaume Plessis on Jan 27, 2010 | Reply
@Rob : just install the php5-mysql package
By Ron Wezeman on Jan 29, 2010 | Reply
PHP5.3.1.0 works (phpinfo) on Jaunty (Ubuntu).
php -v give me some info like deprecated and warnings, but no errors.
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/ps.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626/imagick.so’ – /usr/lib/php5/20090626/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626/mcrypt.so’ – /usr/lib/php5/20090626/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626/pam_auth.so’ – /usr/lib/php5/20090626/pam_auth.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626/ps.so’ – /usr/lib/php5/20090626/ps.so: cannot open shared object file: No such file or directory in Unknown on line 0
Great work. But now going back to 5.2
By Justin on Feb 6, 2010 | Reply
Why on earth does this require the installation of Apache in all its bloated glory? I can’t possibly be the only one here using Lighttpd.
By JAE on Feb 6, 2010 | Reply
Does it really require apache? If you do apt-get install php5-common php5-cgi php5-cli as I usually do – Apache shouldn’t be installed. I think it’s just the default if you just apt-get install php5.
By Guillaume Plessis on Feb 6, 2010 | Reply
@Justin : do as JAE said : just install php5-cgi and the needed dependencies, not the “php5″ metapackage.
By Justin on Feb 6, 2010 | Reply
Spiffy quick reply, JAE. I was looking at an apt-get upgrade (and dist-upgrade when the packages were kept back) like a dolt. At a glance, the new packages appear to be working without a hitch. Thanks for the heads up.
By Justin on Feb 6, 2010 | Reply
@Guillame: A little peculiar dist-upgrade wanted the metapackage since I didn’t install that in the first place. Either way, I’m happy. Thanks for your work.
By Jacky on Feb 13, 2010 | Reply
Hello,
I’m wondering how to fix this error on my Debian 5 x64 amd64 it worked fine, now i get this:
Removing sapi/fpm/configure
Patch 011-suhosin.patch does not remove cleanly (refresh it or enforce with -f)
make: *** [unpatch] Error 1
dpkg-buildpackage: failure: debian/rules clean gave error exit status 2
Build command ‘cd php5-5.3.1 && dpkg-buildpackage -b -uc’ failed.
E: Child process failed
defikon:~# cd
defikon:~# cd php5-5.3.1
defikon:~/php5-5.3.1#
defikon:~/php5-5.3.1# dpkg-buildpackage -b -uc
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set LDFLAGS to default value:
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: source package php5
dpkg-buildpackage: source version 5.3.1-0.dotdeb.1
dpkg-buildpackage: source changed by Guillaume Plessis
dpkg-buildpackage: host architecture i386
debian/rules clean
dh_testdir
sed -i -e ’s/EXTRA_VERSION=”-0.dotdeb.1″/EXTRA_VERSION=”"/’ configure.in
rm -f prepared-stamp
QUILT_PATCHES=debian/patches quilt –quiltrc /dev/null pop -a -R || test $? = 2
Patch 011-suhosin.patch does not remove cleanly (refresh it or enforce with -f)
make: *** [unpatch] Error 1
dpkg-buildpackage: failure: debian/rules clean gave error exit status 2
By Xeross on Feb 13, 2010 | Reply
Hey,
I’ve just updated to the latest version, now setting the default mysql socket is working, but leaving it empty makes PDO assume it’s /tmp/mysql.sock so it seems it still isn’t reading from the proper location.
By Jacky on Feb 13, 2010 | Reply
using ./debian/rules binary in php5-5.3.1 dir i get this:
configure: error: recode extension can not be configured together with: imap
make: *** [configure-apache2-stamp] Error 1
Please help me out =(
Now even my CP doesnt work anymore doing this error with PDO connection:
SQLSTATE[HY000] [2002] No such file or directory
mysql_sock file is located at directory specified in my.ini so no idea what could be wrong
By Xeross on Feb 13, 2010 | Reply
Try also setting it in the PDO section of PHP seems there’s a bug in PDO currently.
By Jacky on Feb 14, 2010 | Reply
em sory i’m kinda new in linux envirement, how todo this ?
By Jacky on Feb 14, 2010 | Reply
is there any way to build php5.3.1 for debian 5 x86 ? as i keep getting errors and i retried it 15x (reinstalled entire system). it worked 100% on amd64 :/
By Jacky on Feb 14, 2010 | Reply
still getting Connection failed: SQLSTATE[HY000] [2002] No such file or directory by ISPCP
seems it uses PDO mysql connection, anyway to fix this module or somthing ?
By Guillaume Plessis on Feb 14, 2010 | Reply
@Xeross : My fix was to replace the default /tmp/mysql.sock by Debian default location : /var/run/mysqld/mysqld.sock
But, changing the defaut_socket location in the PDO settings does not work yet. This issue should be fixed in PHP 5.3.2.
Try to resolve this by setting a symlink. Something like :
ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
Or use local network socket (putting skip-name-resolve in the [mysqld] section of my.cnf should speed up this kind of connection if you only use IP addresses – not canonical names – in your mysql grants)
By Jacky on Feb 14, 2010 | Reply
Guillaume
I LOVE YOU (L) u fixed my issue
ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
This helped with my error Connection failed: SQLSTATE[HY000] [2002] No such file or directory
THANKS ALOT:)
By Guillaume Plessis on Feb 14, 2010 | Reply
@Jacky : First of all, be sure to use up-to-date packages from Dotdeb.
Then, if you want to rebuild them, don’t try to run “./debian/rules clean”, it doesn’t run well at this time.
About your connection problem, it seems to be the same as Xeross’ one. Try to resolve this by setting a symlink. Something like :
ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
Be sure to read all your error logs before posting (many) comments. They often contain the cause of your problem. Then the fix is easy.
By Jacky on Feb 14, 2010 | Reply
yooo now i’m getting:
Warning: idn_to_ascii() expects parameter 2 to be long, string given in /var/www/ispcp/gui/include/ispcp-functions.php on line 374
Any ideas ? i didnt had that warrning with php 5.2.6 now i’m unable to login to ISPCP..
By Guillaume Plessis on Feb 14, 2010 | Reply
@Jacky : intl extension changed with its inclusion by default in PHP 5.3. Be sure your applicaiton is compatible with PHP 5.3, upgrade it if needed and don’t hesit to take a look at the documentation (by example : http://www.php.net/idn_to_ascii )
By Jacky on Feb 14, 2010 | Reply
ah nvm removed this function
Thanks for all the help
By Jacky on Feb 14, 2010 | Reply
Thanks alot really =) I respect people that help when needed.