PHP 5.2.3 Packages Updated

June 19, 2007 by · 38 Comments 

I've updated the PHP 5.2.3 packages to fix a bug I introduced for the 'php-cgi' binary (in that it wasn't actually a CGI/FastCGI file, oops...) by not reading the changelog closely enough.

If you use FastCGI (please tell me no one is still using CGI) then this update is a must for you. If you don't, don't worry about it.

Update (9/24/2009): Packages deleted, use the yum repository instead.


38 Responses to “PHP 5.2.3 Packages Updated”
  1. Brent Wilson says:

    Lighty users gotta have FastCGI :)

  2. Jason says:

    Yup, I know. I actually use these PHP packages on a server with lighttpd & FastCGI but that server, being a bit more critical to business, runs about two weeks behind my others. I didn't notice the problem until I updated last week and found myself without a working cgi-fcgi binary.

  3. matt says:


    I've just installed 5.2 using yum and your repository. Thanks a lot!

    One question; is there any way to have yum install

    '--with-mysql' '--with-gd' instead of '--without-mysql' '--without-gd' (or any configuration for that matter)?

  4. matt says:

    One other question.

    I see from phpinfo()


    However, I don't see apxs in /usr/sbin.

    Any idea how php can run without that there? When I tried to compile php5.2 from source, the configuration failed because apxs wasn't there. It seems to run when installed from your package though.

  5. matt says:

    Well, mysql seems to be working with php even though php has 'without-mysql' being displayed in php.

    Also, doing 'locate apxs' turns up nothing as if the file doesn't even exist.

    Sorry for all these posts, but this is thoroughly confusing.

  6. Jason says:


    All of the features, such as MySQL and GD support, are separated out of the main php package. This results in a smaller executable and it also gives you the option to install only the features you want. Need MySQL support? Install "php-mysql". Need GD? Install "php-gd".

    As to apxs, that is required for compiling PHP, not for actually running it. If you need it for some reason, you can get it by installing "httpd-devel".

  7. Are you by any chance planning (or already have) a RHEL5/CentOS5 repository?

  8. Alvaro Enrique Castillo blanco says:

    i have centos 5.5
    we have the following problem.

    We need to connect php to informix database then

    we download php 5.2.3 pdo_informix csdk (informix product) and apache or html

    we delete anything related package above product

    then we install firs httpd then we try to install php 5.2.3 but it show many error
    like phpize no found

    i write you if you know or have a binary for php that we can install but that have pdo_informix ready and work well at centos 5


    Alvaro Castillo

  9. Alvaro Enrique Castillo blanco says:

    i download your rpm package php 5.2.3-jason.2.src.rmp using centos 5 o.s
    but when i try to install i get a message that say we can install source pagake

    Thanks for your help


  10. Jason says:


    I have a pair of CentOS 5 virtual machines setup but I have not yet started to build updated packages for that OS. One of the reasons is that EL5 already comes with dramatically updated packages as compared to EL4. I am planning on releasing the same updated packages for EL5 but I don't have a timeline as to when I will start.


    There is no CentOS 5.5. If you are using 5.0 then please see my note above about not currently providing packages for EL5 (meaning you'll need to build binaries from the source rpm).

    If you are using 4.5 and need a 3rd party PHP module then you, as you have already noticed, will need the phpize command. That command is part of the php-devel package.

    As to your second comment, I'm afraid I don't really understand what you're saying. A package that ends in "src.rpm" is a source RPM package. Once installed you will need to use the 'rpmbuild' binary to compile and create binary RPM packages. Those binary packages can then be installed locally with 'rpm' or from a yum repository using 'yum' or 'up2date'.

  11. David says:

    Hey Jason,

    I'm on RHEL4, trying to upgrade PHP from 5.0.4 to your build of 5.2.3. I installed your yum repository - thanks a lot by the way, you were the only one where I could find a good MySQL update that was fairly painless. Anyway, I installed your yum repo, tried to 'yum update php', but I get the following at the end:

    Error: Missing Dependency: php = 5.0.4-10.5 is needed by package php-pear
    Error: Missing Dependency: is needed by package mod_python
    Error: Missing Dependency: python-abi = 2.3 is needed by package mod_python

    I had fixed this issue with MySQL by installing the MySQL shared compatibility libraries, but I can't find any such thing from PHP. Can you help?


  12. Jason says:


    The first issue can be fixed by removing your current version of php-pear. Once you've done that your PHP upgrade should go a little smoother (don't forget to reinstall php-pear if it isn't handled automatically).

    The latter two messages are a result of your not using Python 2.3. The mod_python package was built on the version of python in the main EL4 repos, not the version in centosplus.

  13. matt says:


  14. David says:


    According to my server, I'm running Python 2.4.3, which according to yum, is the newest package. Also, I'm not sure how much this makes a difference for PHP, but I'm also running Plesk 8.2 on the server, which I know is pretty version dependent. I've read that upgrading to the newest PHP seems to work for other people running Plesk, which is good.

    Before I uninstall php-pear, though, I need to make sure that I wont have any issues with Python... what do you think?

  15. Jason says:


    php-pear has nothing to do with python so you should be fine on that front. Just remember to reinstall php-pear (from my repo) once the PHP upgrade is done.

    As to python 2.4.x, I just checked again and the newest version of python available in the EL4 codebase is 2.3.4. That would mean that you either got the newer version from the centosplus repository or that it came with Plesk.

    In any case, if you are concerned about upgrading a bunch of packages on your system then you should consider just downloading the src.rpm I linked to above and then rebuilding that into binary RPMs for your system.

  16. Per says:

    Thank you for your yum repository Jason, you got me through the day. I have a question though: Do you know how to install phpize, so that you can install APC? My only findings is that you should probably install php-devel-5.2.3, but since my upgrade I can't seem to do this since the only available package for me is the php-devel-5.1.6-12. Any help would be highly appreciated!

  17. Jason says:

    'phpize' is part of the 'php-devel' package. If you've got my repository installed (and enabled) then you should be able to get 5.2.3 from there. If you're seeing 5.1.6 then that is probably coming from the 'centosplus' repo, although it shouldn't be showing you that if you actually have the other 5.2.3 packages installed.

    Are you sure that you've got php 5.2.3 installed? What is the output of 'rpm -qa | grep php'?

  18. Per says:

    Thank you for your quick reply Jason. Yes, I got your repository installed as you can see below, but not a php-devel package in sight =( I have probably done something fundamentally wrong here, but I cannot understand what.

    And yes, you are right - the 5.1.6 package made available for me comes from CentOS.

    The thing with my whole server configuration (rented DS) is that it came installed with PHP, Apache, MySQL etc, but the installations seemed to very slimmed.

    [[email protected]]# rpm -qa | grep php


  19. Jason says:

    It may have something to do with that copy of 'php-pear' (which is NOT the version from my repository). Try removing it with 'rpm -e php-pear' and then running 'yum update php-pear php-devel'.

    The only other thing I could think of is that you have the protectbase or priorities plugins enabled for the 'base', 'updates', or 'centosplus' repos.

  20. Jason, while RHEL5 packages are newer than RHEL4, they are by far not recent. PHP version packaged with RHEL5 is 5.1.6 which is quite a few versions from the current and not that far from RHEL4's 5.1.2. MySQL is 5.0.22, Xcache is not packaged. We are going to be using your packages for our site, so I would like to offer any help you might need/want in maintaining these packages. I am fairly familiar with software building tools and know a little bit about spec file writing. I can probably setup a mirror for your repository on our site as well.

  21. Per says:

    Thank you King Jason. You were very much correct in that I had set a protectbase for 'base','updates' and 'centosplus' repos. I think I did so when installing another yum repository (uncertain of the name) because they simply told me to. And me being sort of a Linux illiterate doesn't add well to that. I would _never_ had succeded without your help, thank you once more. You are thee man.

  22. Jason says:


    "King Jason"... I like the sound of that. Anyway, I'm glad it worked out for you.


    I appreciate the offer. I'm actually coming up on a bit of free time so I'm hoping to have the EL5 packages ready to go within the next few days. Once I'm past that initial build (which is what, up until now, I haven't had the time to do), there's really not much to the package maintenance.

    I'll let you know though if things change.

  23. David says:


    The problem with that, is that when I go to uninstall php-pear, it lists a total of 78 things it wants to uninstall along with it. I talked to my hosting support, and they mentioned that that's a bad idea. Same with compiling from source, since I've never done that before. Instead, they want me to upgrade from Fedora 4 to 5, since the normal yum repositories have something above php 5.0.4, since Fedora 4 apparently only supports up to that.

    What do you think?

  24. Jason says:


    You're using Fedora? If so, I really don't know what effects these packages may have on your system. They are intended for use on RHEL/CentOS 4.

    In any case, yes, ordinarily removing a package with deps would be bad. In this case, since you're going to put it right back, you can remove it with nodeps and then reinstall the version from my repo, there really shouldn't be any issues with that.

  25. Alan says:

    Am trying to rebuild the SRPMs (need some debugging support), but I see the SPEC file for php-5.2.3-jason.2.src.rpm does not include some critical modules (for me) which you have in your repository... specifically, the mcrypt, mhash, and tidy modules.

    Since these are not included as subpackages in the php src.rpm, how are you building them? Do you use a different spec file?

    Thanks for your work here, much appreciated.

  26. Jason says:


    Yes, I use a second spec file for the php-dbase, php-tidy, php-mhash, and php-mcrypt packages. These are kept separate because they have dependencies on packages that are not available in the stock 'base' and 'updates' repos for EL4. I can provide the spec file if you'd like but you may have trouble building it.

  27. Sam Roberts says:

    Hi Jason. Happy 25th!

    Since I took the plunge and yummed up your PHP 5.2.3, which pulled in httpd 2.2.4 etc, I can no longer get mod_security 2.1x to either install as a RPM or compile on my CentOS 4.5 system.

    Neither the 'official' EL4 RPM's from here:

    or here:

    install successfully.

    If I download the latest source from here:

    and try and compile it it doesn't work either.

    Apache refuses to start and the errors I get from Apache with the RPM's include:

    "Cannot load /etc/httpd/modules/ into server: /etc/httpd/modules/ undefined symbol: xmlFree"

    "Cannot load /etc/httpd/modules/ into server: /etc/httpd/modules/ undefined symbol: msc_alert"

    or with the compiled version:

    "error on line 204 of /etc/httpd/conf/httpd.conf: API module structure `security2_module' in file /etc/httpd/modules/ is garbled - perhaps this is not an Apache module DSO?"

    Any tips about how youve compiled Apache that may be useful to know here? Or even better, have you managed to successfully get mod_security 2.1 working on any of your rigs?

    mod_security working is important for me :) On my stock CentOS 4.5 config, mod_security 1.9.4 ran OK.

  28. Sam Roberts says:

    Hi Jason:

    After much futzing and Googling, success!!!

    Thanks to the neato guide at:
    (embarrassing to admit, I know, but really that guide nailed the install in a way that the **hopelessly** crappy mod_security documentation never did).

    mod_security 2.1.2 is now working on my CentOS 4.5 i386 server, alongside your latest PHP/Apache/MySQL and Xcache binaries. Yay!!!!!

    So belay that original request for help.

    Now, after hours of arsing around with Linux, I can finally get some actual work done on my sites.

  29. Jason says:


    I'm glad to hear that you got it working. I'm actually whipping up a mod_security package now as I know that there are some others out there who use this package.

  30. Sam Roberts says:

    Hi again Jason.

    Good to hear that you are packaging up a mod_security RPM.

    I spoke too soon about getting mod_security running OK, alas.

    It compiled fine against your httpd and it does startup without errors, but when it runs it throws mod_security errors and even lots of Apache segmentation errors, viz:

    [Thu Aug 23 20:41:56 2007] [notice] child pid 8150 exit signal Segmentation fault (11)
    [Thu Aug 23 20:41:57 2007] [notice] child pid 8152 exit signal Segmentation fault (11)
    [Thu Aug 23 20:42:01 2007] [notice] child pid 8151 exit signal Segmentation fault (11)
    [Thu Aug 23 20:42:07 2007] [notice] child pid 8153 exit signal Segmentation fault (11)
    [Thu Aug 23 20:47:14 2007] [notice] child pid 11755 exit signal Segmentation fault (11)
    [Thu Aug 23 20:47:15 2007] [notice] child pid 13780 exit signal Segmentation fault (11)
    [Thu Aug 23 20:47:20 2007] [notice] child pid 8149 exit signal Segmentation fault (11)

    Interestingly enough, the modsec audit log even shows up some Apache error that points to your redhat Apache compile location, something I have never seen before:

    Message: Could not set variable "resource.alerted_960903_compression" as the collection does not exist.
    Message: Warning. Operator EQ match: 0. [id "960903"] [msg "ModSecurity does not support content encodings"] [severity "WARNING"]
    Apache-Error: [file "/usr/src/redhat/BUILD/httpd-2.2.4/server/core.c"] [line 3633] [level 3] File does not exist: /
    Stopwatch: 276585 1187927736766480 (1187927736763273 1187927736765391 -)
    Producer: ModSecurity v2.1.2 (Apache 2.x)
    Server: Apache


    I have mod_security 2.1.1-rc2 running fine on a stock CentOS 5 (my dev machine), which is why the probs I am having on CentOS 4.5 are so annoying. I think I used the tanso mod_security RPM for my CentOS 5 server, from:

    So...if you ship a mod_security RPM, and it works error free with your http, that will be very welcome indeed :)

  31. Jason says:


    I compiled mod_security without issue and it seems to work fine, although I can't say that I've tested it exhaustively. I'll update the repo within the next few minutes. Try cleaning out the binary and config files from your mod_security install and then run "yum install mod_security".

  32. james says:

    hi jason,
    i am in dire need to install magento commerce.

    it requires php 5.2x and that is why i stumbled across your site so i can get my ph 5.1x to 5.2x .

    however, magento commerce also needs to have mysqli . how can i get mysqli compiled ?

    usually by source, i just need to do --with-mysqli=/usr/bin/mysql_config

    but with yum i'm not sure i have that ability.

    would you mind helping me out?

  33. Jason says:


    I have never heard of that program (and an app that requires a specific version of PHP, particularly one that is bleeding-edge, may not be the best choice for a mission-critical system) but the mysqli extension is included in the "php-mysql" package.

  34. Snorkel says:

    Hi Jason,
    Any plans for php 5.2.4 source packages?

  35. Jason says:

    A post about PHP 5.2.4 is coming within the next hour or so. A link to the src.rpm will be included.

  36. Rouslan. says:

    Hi Jason!

    It is not nessesary to make this post public, I have a privat question to you.

    Could you help me with configuring of my dedicated server to the best of your knowlede, possibly installing ModSecurity. I may need some consultations as well. We can discuss you incentives for your work.
    I am a programmer and an engineer, but I have very limited knowlege about servers.

    Please write me a privat email.

    Best regards.

  37. How to Get Six Pack Fast says:

    After reading this article, I feel that I really need more info. Can you suggest some resources ?


Check out what others are saying about this post...
  1. [...] (6/19/2007): The PHP 5.2.3 packages have been updated.  The Source RPM link below has also been updated to prevent anyone from downloading an [...]

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


Note: This post is over 5 years old. You may want to check later in this blog to see if there is new information relevant to your comment.

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution. Use of a non-personal web site or blog in the "Web Site" field and/or leaving a comment that is off-topic or inappropriate may result in the comment being edited or removed at the discretion of the site owner.