Upgrading to PHP 5.2.4 on RHEL and CentOS

Well, it's been 3 months since the last release of PHP 5.2 but 5.2.4 is finally here. Unlike the earlier releases of PHP 5.2 which have included both performance/memory optimizations as well as fixes for critical bugs (security issues and otherwise), this release is aimed at improving the overall stability of the 5.2 release chain (no doubt aiming to improve the image of PHP 5.2 with 4.4 being discontinued at the end of the year) by fixing more than 120 small bugs, as well as taking the opportunity to fix a few low-level security holes.

The PHP development team didn't slap a "0mg!!! j00 m|_|$7 |_|pd473 j00r php 0r 3l$3 j00 \/\/1ll b3 h4ck3d!!!" tag on this one but stability is always a good thing so I would recommend that all of my readers upgrade when they get a chance. Really though, since I do all the work, do you really have an excuse NOT to update?

Along with the upgraded PHP packages I've also generated updated versions of the PCRE packages. PHP 5.2.4 updated the bundled version to 7.2 and I was still on 7.0, so I figured, "why not stay ahead of the crowd?" and jumped all the way to 7.3.

UPDATE (9/17/2007): The src.rpm has been updated. Those of you having problems using it to build your own binaries shouldn't have issues anymore. Also, in these newer revision packages I have added "php-mssql" and "php-embedded" as both of these are in the latest builds from Fedora Devel. Finally, php-dbase has been merged into php-common, again, as with the latest packages from Fedora Devel.

PHP 5.2.4 Release Notes / Changelog

PHP 5.2.4 Source RPM

70 Responses to “Upgrading to PHP 5.2.4 on RHEL and CentOS”


  1. 1 Snorkel

    Jason,
    Are there any changes needed to the spec file, or is it good to go as is?

  2. 2 Jason

    @Snorkel,

    The RPMs generated by the src.rpm are functionally-identical to those available in the default packages from Red Hat. If you require something extra then you would need to edit the spec file. Really though, why not just use the binary packages I've provided in my yum repo?

  3. 3 Snorkel

    Can't use the binaries as they are built with a newer version of Apache. I have to keep my current version.

  4. 4 Snorkel

    Having a problem building 5.2.4
    I built it the same way as I did 5.2.3 but it's hanging here:

    FAIL EXPECT [tests/run-test/test001.phpt]
    FAIL EXPECTF [tests/run-test/test002.phpt]
    FAIL EXPECTREGEX [tests/run-test/test003.phpt]
    FAIL INI section allows '=' [tests/run-test/test004.phpt]
    TEST 5/2569 [tests/run-test/test005.phpt]

    And before this it's showing a bunch of these:

    Warning: PHP Startup: Unable to load dynamic library '/usr/src/redhat/BUILD/php-5.2.4/build-apache/modules/pgsql.so' - /usr/src/redhat/BUILD/php-5.2.4/build-apache/modules/pgsql.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/src/redhat/BUILD/php-5.2.4/build-apache/modules/snmp.so' - /usr/src/redhat/BUILD/php-5.2.4/build-apache/modules/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0

    Any ideas?

    It's weird because I have not made any changes to the server since I built 5.2.3

    Later,

    Snorkel

  5. 5 Jason

    @Snorkel,

    Those warnings mean that the loadable modules created during the compile are not where they are supposed to be (or perhaps failed to build at all). What version of httpd are you using? Was it installed using RPMs or did you compile from source? Also, you're not trying to build PHP as 'root', are you?

  6. 6 Dmitriy Kropivnitskiy

    We were in the middle of testing our stuff for a 5.1.2 -> 5.2.3 upgrade. Is it still possible to somehow get the 5.2.3 packages? If not binaries, maybe SRPM?

  7. 7 Dmitriy Kropivnitskiy

    My apologies, the 5.2.3 packages seem to be still there. Please do not delete them! :)

  8. 8 Jason

    @Dmitriy,

    I generally leave the binary packages around for 2-3 prior versions. After that they are deleted for space concerns (although the SRPMS are kept around).

  9. 9 Snorkel

    oh, yes I do the build as root, just did 5.2.3 that way and it worked perfectly.
    I tried a regular user but the build fails because of rights.

  10. 10 Snorkel

    Seems to be something odd with the 5.2.4 spec file.
    modules are being put in /var/tmp/php-5.2.4-jason.1-root-root/usr/lib/httpd/modules/
    but the php startup islooking for them in /usr/src/redhat/BUILD/php-5.2.4/build-apache/modules/

    It just hangs forever on TEST 5/2569 [tests/run-test/test005.phpt]

    It's probably some dependency, but there is no error generated, so I have no idea what it might be. Seems to me I had this issue before. will look back in the blog to see if I did.

  11. 11 Snorkel

    nope, didn't have this issue before, but someone who was building 5.2.3 from source did in the blog entry comments for that version.
    Building as a non root user now.

  12. 12 Snorkel

    Well, get the same result as a non root user....
    It's hanging on test 5 , anyone know what that particular test is?

  13. 13 Jason

    @Snorkel,

    According to the notes in that file, that test checks error handling. It is probably hanging because the first actual line of code checks to see if an extension is loaded. In your case, it seems like the extension dirs are getting messed up.

    Honestly though, it sounds to me like the real problem is that your build environment isn't setup properly (since you can build as root but not as a regular user). I used to build as a non-root user in /usr/src/redhat but had nothing but problems with certain packages. I would suggest that you try out the directions at the URL below.

    http://www.jasonlitka.com/2007/05/21/setting-up-an-rpm-build-environment/

  14. 14 snorkel

    Hi Jason,
    I will take a look at the link. Thanks.

    I don't think my build environment is that messed up though, I was able to build all the versions up until this one. I even built 5.2.3 today as a test and it worked fine.

    I am currently trying to build on a different server.

    Later,

    Snorkel

  15. 15 snorkel

    Well, I got it all built and the problem was the old version of php was still installed.
    I removed the 5.2.3 version completely and then it built just fine.
    I think the base API has changed a bit in 8.2.4 and when the tests where being run it was picking up the currently installed CLI (command line interface) to run the tests.
    No changes where made to the system other than doing a rpm -e for all the existing php packages.

    Anyway, hope that helps someone else who may be running into the same issue.

    Later,

    Snorkel

  16. 16 Jason

    @snorkel,

    I'm glad to hear that you got it worked out, although removing the existing copy of PHP shouldn't have had anything to do with it as I test compile the src.rpms with and without the prior version already installed, just to make sure that I haven't created any dependencies on something I shouldn't have.

  17. 17 Snorkel

    I agree, I never had to do that before. For whatever reason that new spec file is picking up the path (from the environment vars) to the currently installed php command line executable to run the tests.
    I verified this on two separate servers. Won't build with 5.2.3 installed, remove the old version and it builds completely and the tests all pass.

  18. 18 Randy

    Jason,

    Thanks for this info! I have used your repository to successfully install PHP and Apache. However, I noticed that my PHP configuration requirements are significantly different from what you provide in your repository. I am assuming I could take your source RPM and make the changes, but I am pretty clueless on how to do this. Could you point me to a resource that would explain how I would go about doing this? If it can't be for PHP specifically, then for source RPMs in general?

    Thanks.

  19. 19 Nick

    Hi Jason

    I've successfully run the rpm - I think... Previously I had php 5.1.4 installed which is still there. Have restarted Apache but 5.1.4 is still the default. What should I do to set it to 5.2.4? Thanks in Advance

    Nick

  20. 20 Jason

    @Randy,

    I'm not sure how that could possibly be the case as I am providing the same packages (more, actually) that come with RHEL & CentOS. As with the stock RPMs, if you need MySQL support then you would also have to install 'php-mysql', PostgreSQL would be 'php-pgsql', IMAP would be 'php-imap', etc. What is it that you need that isn't available?

    @Nick,

    If your previous version was installed using RPMs then it should have been removed automatically. If it was installed via source then you would have to remove it yourself. If that is the case, you may want to reread the second-to-last paragraph on the Yum Repository page.

    http://www.jasonlitka.com/yum-repository/

  21. 21 Jesse

    Jason,

    I noticed that the last couple of upgrades for PHP listed all of the modules I've installed as dependencies except php-dbase.x86_64. Not really a major thing cause i just upgrade that after php installs, just a minor annoyance.

    Jesse

  22. 22 Jason

    @Jesse,

    I'm not exactly sure what you mean. Are you saying that when you upgraded from 5.2.3 to 5.2.4 that 'php-dbase' stayed at 5.2.3 until you manually updated it?

  23. 23 Jacek

    BTW, a new version of MySQL Enterprise is available at:
    http://mirror.provenscaling.com/mysql/enterprise/source/5.0/mysql-5.0.48.tar.gz
    It seems that it is OK to use according to GPL.
    Best wishes, Jacek

  24. 24 Jesse

    @Jason,

    That is correct...'php-dbase' stayed at 5.2.3 until i manually upgraded it.

  25. 25 Jason

    @Jacek,

    Thanks. I've been playing around with the sources from BitKeeper but they require a bit of work before they're ready to go so I've been a bit hesitant in actually releasing binaries built from those sources.

    @Jesse,

    I looked at the spec file and I believe that I know what the issue is. The next release should need to be manually updated as you have done in the past but everything after that should take care of itself. Thanks for pointing out this issue.

  26. 26 Bo

    can you tell us how you build the patch files?

  27. 27 Jason

    @Bo,

    What patch files are you referring to?

  28. 28 Bo

    Patch1: php-5.1.4-gnusrc.patch
    Patch2: php-4.3.3-install.patch
    Patch5: php-5.0.2-phpize64.patch
    Patch8: php-5.2.0-includedir.patch

    # Fixes for extension modules
    Patch22: php-4.3.11-shutdown.patch
    Patch23: php-5.2.2-pdosym.patch

    # Functional changes
    Patch30: php-5.0.4-dlopen.patch
    Patch31: php-5.0.0-easter.patch

    # Fixes for tests
    Patch50: php-5.0.4-tests-dashn.patch
    Patch51: php-5.0.4-tests-wddx.patch

    those files are what i was refering to.

  29. 29 iDaemon

    Sorry for dummy question

    Can i run this rpm instantly? I have maunaul installed apache php mysql build from your past post here http://www.jasonlitka.com/2006/11/21/upgrading-php-rhel4-centos4/

  30. 30 Jason

    @Bo,

    Those patches were inherited from the original package that came from RH. I leave them there to keep my packages as close to identical in functionality to the originals as possible. Some of the patches present in my older packages have been removed because they have been accepted into the main code base, others were updated by me to cover changes to the sources that didn't resolve the "issue" that RH was trying to patch.

    @iDaemon,

    I saw your thread over at vbulletin.com. You must be back here to head off the inevitable suggestion from George (eva2000) that you update your httpd, PHP, and MySQL versions to the newest available.

    In any case, PHP is dependent on a few packages, most notably httpd. If you are using my yum repository then all you need to do is to run "yum update" and you'll get the newest versions of httpd, PHP, and MySQL. If not, but you are running httpd 2.2.x, then yes, you should be able to use the binary RPMs from my repo without issue. If you are running httpd 2.0.x or 1.3.x then you would need to download the src.rpm I provided and build it into binary RPMs for your system. There may be a couple other dependencies to fill (apr, apr-util, pcre) but if you've already upgraded using that other tutorial then you've probably already got them covered.

  31. 31 Carmine

    Jason,

    I'm having a similar problem as Snorkel did above. Building the RPM from SRC is failing at test005.phpt.

    Your 5.2.3 package worked with out any problems, but following the same procedure with 5.2.4 is giving me the above issue. Compiling as myself, not as root, and following your instructions on setting up the dev environment. Here is a snipet of where it starts to bomb:
    -----
    cd build-apache
    export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
    NO_INTERACTION=1
    REPORT_EXIT_STATUS=1
    MALLOC_CHECK_=2
    unset TZ LANG LC_ALL
    make test

    Build complete.
    Don't forget to run 'make test'.

    PHP Warning: PHP Startup: Unable to load dynamic library '/home/carmine/rpms/BUILD/php-5.2.4/build-apache/modules/bcmath.so' - /home/carmine/rpms/BUILD/php-5.2.4/build-apache/modules/bcmath.so: cannot open shared object file: No such file or directory in Unknown on line 0

    .... follows with several of the same errors for different .so files.

    =====================================================================
    CWD : /home/carmine/rpms/BUILD/php-5.2.4
    PHP : /home/carmine/rpms/BUILD/php-5.2.4/build-apache/sapi/cli/php
    PHP_SAPI : cli
    PHP_VERSION : 5.2.4
    ZEND_VERSION: 2.2.0
    PHP_OS : Linux - [hidden] 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686
    INI actual : /home/carmine/rpms/BUILD/php-5.2.4/build-apache/tmp-php.ini
    More .INIs : /etc/php.d/bcmath.ini,/etc/php.d/dba.ini,/etc/php.d/dom.ini,/etc/php.d/gd.ini,/etc/php.d/imap.ini,
    /etc/php.d/json.ini,/etc/php.d/ldap.ini,/etc/php.d/mbstring.ini,/etc/php.d/mysql.ini,/etc/php.d/mysqli.ini,
    /etc/php.d/ncurses.ini,/etc/php.d/odbc.ini,/etc/php.d/pdo.ini,/etc/php.d/pdo_mysql.ini,/etc/php.d/pdo_odbc.ini,
    /etc/php.d/pdo_pgsql.ini,/etc/php.d/pdo_sqlite.ini,/etc/php.d/pgsql.ini,/etc/php.d/snmp.ini,/etc/php.d/soap.ini,
    /etc/php.d/xmlreader.ini,/etc/php.d/xmlrpc.ini,/etc/php.d/xmlwriter.ini,/etc/php.d/xsl.ini,/etc/php.d/zip.ini
    Extra dirs :

    =====================================================================
    TIME START 2007-09-12 12:58:24
    =====================================================================
    FAIL EXPECT [tests/run-test/test001.phpt]
    FAIL EXPECTF [tests/run-test/test002.phpt]
    FAIL EXPECTREGEX [tests/run-test/test003.phpt]
    FAIL INI section allows '=' [tests/run-test/test004.phpt]
    TEST 5/2569 [tests/run-test/test005.phpt]

  32. 32 iDaemon

    first, I want to say thank you jason, I'm noobie and not server admin but i can built my own server setup from your blog, cheer!

    yes i have follow all of your apache, php, mysql built-up

    but after i have tried yumupdate i got this error
    Error: Missing Dependency: libmysqlclient_r.so.14(libmysqlclient_14) is needed by package MySQL-python

  33. 33 iDaemon

    I just take a time in your site and know that you change to yum repository.

    so what I have to do is edit yum repository and run yum update right?

    please suggest me.

  34. 34 Jason

    @iDaemon,

    If you're running EL4 and you require older versions of the mysql client libraries then install the "mysqlclient14" and/or "mysqlclient10" packages as needed. This should be done automatically if you have my repository configured on your system although stranger things have happened than a dependency not being automatically filled...

    @Carmine,

    I have still not been able to duplicate that on my development boxes. It looks like you're building on 32-bit EL4, correct? Can you give me a list of the php-5.2.3 packages you already have installed? Maybe it's caused by some package I don't typically install. In any case, I'll give the build another try on my EL4 32-bit system...

  35. 35 Carmine

    @Jason,

    It seems like Snorkel said, that the path or environment variable maybe wrong. Nothing is actually in that build-apache directory created as part of the build. Here's what I got:

    rpm -qa | grep php

    php-bcmath-5.2.3-jason.2
    php-ldap-5.2.3-jason.2
    php-soap-5.2.3-jason.2
    php-dba-5.2.3-jason.2
    php-ncurses-5.2.3-jason.2
    php-xmlrpc-5.2.3-jason.2
    php-gd-5.2.3-jason.2
    php-pgsql-5.2.3-jason.2
    php-pear-4.3.9-3.22.5
    php-cli-5.2.3-jason.2
    php-devel-5.2.3-jason.2
    php-mbstring-5.2.3-jason.2
    php-pdo-5.2.3-jason.2
    php-xml-5.2.3-jason.2
    php-debuginfo-5.2.3-jason.2
    php-odbc-5.2.3-jason.2
    php-5.2.3-jason.2
    php-imap-5.2.3-jason.2
    php-snmp-5.2.3-jason.2
    php-common-5.2.3-jason.2
    php-mysql-5.2.3-jason.2

  36. 36 iDaemon

    i need to delete old xxx.repo inside /etc/yum.repos.d/ ?
    or i just add utterramblings.repo and then run yum update?

    there two files inside CentOS-Base.repo and kbsingh-CentOS-Extras.repo

  37. 37 Jason

    @iDaemon,

    Do not delete the default repos. Just add a file called "utterramblings.repo" with the content from the "Yum Repositories" page to the "/etc/yum.repos.d/" folder.

    @Carmine,

    I'll take a look at this today.

  38. 38 JMR

    I was able to update mysql using yum update mysql-devel , however I am having problems when trying to update php. If I just type "yum update" which you mention several times on this site to do after installing your repository, I get an error

    Error: Missing Dependency: mod_jk >= 1.2.0 is needed by package turbopanel-tomcat

    If I do " yum update php" I get the same error as above in addtion to

    Error: Missing Dependency: php-common = 5.2.3-jason.1 is needed by package php-xml

    I am currently running PHP version 4.3.9 and MySQL 5.0.48-jason.1

    Any help would be appriciated

  39. 39 Jason

    @JMR,

    The main packages in my repository are httpd 2.2.x, PHP 5.2.x, and MySQL 5.0.x. MySQL has no dependency on the other two which is why you were able to install it. httpd & PHP are another story entirely. httpd does not depend on either MySQL or PHP but PHP and other extensions do have version-specific dependencies on it.

    As I understand it, mod_jk is a part of Tomcat, correct? If so, whatever version you have would need to be recompiled for httpd 2.2.x as httpd extensions are not (usually) portable between versions. Once you had those packages available, the rest of the binaries I've made available should fall into place nicely.

    An alternative would be for you to take the Source RPM I've provided and to build binaries for your own system running whatever version of httpd you have installed.

  40. 40 JMR

    Thank you for the reply, and pardon my lack of experience with this. To back-track a little, I am installing from a fresh virtual private server. It came standard with CentOS 4 and php 4.3.9. I did some searching and I found this site, and decided to try and follow the directions to get php and mysql updated.

    I have no idea what mod_jk is. I didn't even know what Tomcat was, after I did some investigation, I found out Tomcat wasn't even activated on the server. I tried activating it and running the yum update again, but same result. After looking through the Tomcat interface, I don't even need it. Can I somehow stop the system form depending on mod_jk? How exactly would I recompile mod_jk for httpd 2.2.x ? I couldn't even find where to download mod_jk.

    I would be willing to build the binaries myself, if possible, please provide what steps I would need to take to do that... I will search your website in the meantime, thanks for the help!

  41. 41 Jason

    @JMR,

    Quick question, was a control panel installed on your server (CPanel, Plesk, etc.)? If so, Tomcat may have been installed as a part of it. If that is the case, you'd probably be best off removing it from there.

    If not, and if you're not using TomCat, then I'd I'd start with "yum remove mod_jk" and see what it wants to remove. If you're sure you're not using anything on the list then go ahead and let it do it.

  42. 42 JMR

    Hello Jason,

    Yes I am using a control panel, it's called Simple control panel, something developed by godaddy. I figured I would try using it before paying extra for cPanel or Plesk.

    I couldn't find a way to easily remove Tomcat from the interface, so I went ahead and did a "yum remove mod_jk " and the only dependencies was something called turbopanel and tomcat. I went ahead and said Yes to remove mod_jk.

    I went back and did "yum update" and everything looks like it was installed correctly! I am now running PHP version 5.2.4 ! Thank you for saving me alot of time and headaches trying to figure this out!!

  43. 43 JMR

    ***Correction, while my php was updated, I seemed to have killed my web server with the above process...back to the drawing board, I am re-provisioning the server.

  44. 44 Jason

    @JMR,

    I just looked into this and apparently 'turbopanel' is actually the poorly-named package for the "Simple Control Panel". If that package depended on tomcat and mod_jk then it is probably written with JSP. If that is the case, you will, in all likelihood, not be able to use my repo with their control panel.

  45. 45 Psykick

    Hi Jason,

    Thanks for the previous version of PHP 5.2.3, went without a hitch and downloading and about to try new version 5.2.4

    One question though, have you enabled the DOM module in this release as in previous release DOM was not enabled?

    Regards

  46. 46 OJ

    I am having problems with the Apache Update module of the new cPanel WHM 11. I have selected the option to compile Apache with PHP 5.2.4 but it seems that I cannot find the configuration option --with-xsl=[DIR] in cPanel's Apache build script. Did the guys from cPanel intentionally miss out this flag or is the Apache build script buggy? I have RPM'ed libxslt, libxslt-devel, and even libxslt-python to no avail. Any idea anyone? Comments deeply appreciated. Thanks.

  47. 47 Psykick

    OJ ...

    Perhaps you're missing httpd-devel rpm?

  48. 48 Psykick

    Perhaps also libxml-devel? But that should have been installed with libxslt-devel or libxsl-devel

  49. 49 Psykick

    Hi Jason,

    Thought that I'd at least reply to my own message for anyone else that was wondering. Yes, DOM is enabled.

  50. 50 OJ

    Hi Psykick, sorry about my post. It turned out that phpinfo() wasn't showing the --with-xsl flag and the XSL extension information, BUT the XSL extension and classes work! (for some reason I don't know why they hid XSL from phpinfo()).

    On the other hand, the DOM and XSL extensions show in phpinfo() on Windows.

    Anyway, thanks guys. Happy coding!

  51. 51 Jason

    @OJ,

    I really don't know anything about CPanel aside from the fact that it compiles everything from source even if you're using an RPM-based distro. If you are using CPanel then you cannot use the files from my repo.

    @Psykick,

    DOM is a part of the 'php-xml' package. If you install it then it will work. It will never show at the top of your phpinfo() as the modules are all compiled separately to minimize the size of the core and reduce the number of features that are forced on people.

    Oh, and this is not any different from 5.2.3. If you had 'php-xml' installed while you were using that version then it should have worked just fine (as the module passed the test after compile).

  52. 52 Jeremy

    Hi Jason,

    Thanks for everything on this site. It is very informative and helpful. I am very much a Linux novice, and I need to set up php with zip support on RHEL5. I have everything updated to your most recent versions, but I am unsure as to how I can recompile your package to include zip support. Is there something that I am missing or a different way to go about this?

    Thanks!
    Jeremy

  53. 53 Jason

    @Jeremy,

    The 'php-common' package provides 'php-zip'. If that isn't what you need then you may want to tell me what configure statement is needed to provide the support you require.

  54. 54 BigHusky

    Not sure if my first post went through.

    I installed a new CentOS 5 server and have added httpd, mysql and php from this repository. So far so good. When I went to install php-domxml though I ran into the following error:
    yum --enablerepo=utter install php-domxml
    Loading "installonlyn" plugin
    Setting up Install Process
    Setting up repositories
    base 100% |=========================| 1.1 kB 00:00
    updates 100% |=========================| 951 B 00:00
    utter 100% |=========================| 951 B 00:00
    addons 100% |=========================| 951 B 00:00
    extras 100% |=========================| 1.1 kB 00:00
    Reading repository metadata in from local files
    Parsing package install arguments
    Resolving Dependencies
    --> Populating transaction set with selected packages. Please wait.
    ---> Package php-xml.i386 0:5.2.3-jason.2 set to be updated
    --> Running transaction check
    --> Processing Dependency: php-common = 5.2.3-jason.2 for package: php-xml
    --> Processing Dependency: libxslt.so.1 for package: php-xml
    --> Processing Dependency: libexslt.so.0 for package: php-xml
    --> Restarting Dependency Resolution with new changes.
    --> Populating transaction set with selected packages. Please wait.
    ---> Package libxslt.i386 0:1.1.17-2 set to be updated
    --> Running transaction check
    --> Processing Dependency: php-common = 5.2.3-jason.2 for package: php-xml
    --> Finished Dependency Resolution
    Error: Missing Dependency: php-common = 5.2.3-jason.2 is needed by package php-xml

    The php packages I have installed so far are:
    php-common-5.2.4-jason.2
    php-cli-5.2.4-jason.2
    php-pdo-5.2.4-jason.2
    php-5.2.4-jason.2
    php-mysql-5.2.4-jason.2
    php-gd-5.2.4-jason.2

    Any chance we can get that php-xml updated ?

    Thank you in advance

    BH

  55. 55 Jason

    @BigHusky,

    I'm not sure why you're trying to install "php-domxml"; that is not a valid package in my repo. You probably want "php-xml" (of which there is a 5.2.4-jason.2 release). Let me know if you have trouble with that package.

  56. 56 Peter

    I have similar trouble when trying to install upgrade php to 5.2.4. I have stock RHEL 5.

    # yum install php
    Loading "installonlyn" plugin
    Loading "rhnplugin" plugin
    Setting up Install Process
    Setting up repositories
    rhel-i386-server-5 100% |=========================| 1.2 kB 00:00
    rhel-i386-server-vt-5 100% |=========================| 1.2 kB 00:00
    Reading repository metadata in from local files
    Parsing package install arguments
    Resolving Dependencies
    --> Populating transaction set with selected packages. Please wait.
    ---> Package php.i386 0:5.2.4-jason.2 set to be updated
    --> Running transaction check
    --> Processing Dependency: php-common = 5.2.4-jason.2 for package: php
    --> Processing Dependency: php Processing Dependency: php-cli = 5.2.4-jason.2 for package: php
    --> Restarting Dependency Resolution with new changes.
    --> Populating transaction set with selected packages. Please wait.
    ---> Package php-cli.i386 0:5.2.4-jason.2 set to be updated
    ---> Package php-common.i386 0:5.2.4-jason.2 set to be updated
    --> Running transaction check
    --> Processing Dependency: php-common = 5.1.6-15.el5 for package: php-xml
    --> Processing Dependency: php Processing Dependency: php-common = 5.1.6-15.el5 for package: php-gd
    --> Processing Dependency: php-common = 5.1.6-15.el5 for package: php-mbstring
    --> Processing Dependency: php-common = 5.1.6-15.el5 for package: php-pdo
    --> Processing Dependency: php-common = 5.1.6-15.el5 for package: php-mysql
    --> Processing Dependency: php-common = 5.1.6-15.el5 for package: php-imap
    --> Restarting Dependency Resolution with new changes.
    --> Populating transaction set with selected packages. Please wait.
    ---> Package php-mysql.i386 0:5.2.4-jason.2 set to be updated
    ---> Package php-xml.i386 0:5.2.4-jason.2 set to be updated
    ---> Package php-pdo.i386 0:5.2.4-jason.2 set to be updated
    ---> Package php-gd.i386 0:5.2.4-jason.2 set to be updated
    ---> Package php-mbstring.i386 0:5.2.4-jason.2 set to be updated
    ---> Package php-imap.i386 0:5.2.4-jason.2 set to be updated
    --> Running transaction check
    --> Processing Dependency: php Finished Dependency Resolution
    Error: Missing Dependency: php <= 5.2.0 is needed by package php-sqlite2

    Any idea how to fix that?

  57. 57 Jason

    @Peter,

    To my knowledge, there is no package that ships with EL5 called "php-sqlite2". If you are using RPMs from some other 3rd party repository then you may run into issues. If not, I don't have any idea where that dep is coming from.

    In any case, sqlite functionality is rolled into "php-pdo", so you should be OK in removing that "php-sqlite2" package and then installing "php-pdo".

  58. 58 Peter

    Thanks Jason,

    I will give it a try

  59. 59 Harabanar

    Thank you for this .. It was all a success for me.

  60. 60 Harabanar

    .. I was a bit to fast on saying that.

    When I run

    $ rpmbuild --rebuild php-5.2.4-jason.2.src.rpm

    It all goes well untill it reaches the testing. Then it hanges on
    [..]
    PASS zlib.inflate (with convert.base64-decode) [ext/zlib/tests/zlib_filter_inflate.phpt]
    TEST 2543/2569 [sapi/cgi/tests/001.phpt]

    Could anyone tell me why, and how can I get passed this point?

  61. 61 Harabanar

    I did it .. I uninstalled the previous version (which was 5.1.4) and then it worked fine.

    Thanx .. now onto httpd 2.2.6 :D

  62. 62 harabanar

    ARHHHGG ...

    How the f**** do I get oci8-instant-client to work as well.

    damn me! :S

  63. 63 Harabanar

    When I add --with-oci8=instantclient,$ORACLE_HOME/lib I get an error saying

    checking Oracle Instant Client directory... /usr/lib/oracle/10.2.0.2/client/lib
    checking Oracle Instant Client SDK header directory... /usr/include/oracle/10.2.0.2/client
    checking Oracle Instant Client version... 10.1
    checking for unixODBC support... yes, shared
    checking whether to enable pcntl support... yes
    checking for fork... no
    configure: error: pcntl: fork() not supported by this platform
    error: Bad exit status from /var/tmp/rpm-tmp.58259 (%build)

    Can anyone tell what I am doing wrong ?

  64. 64 Jason

    @Harabanar,

    Some people have had issues with the tests when they've already got PHP installed. As you already found out, removing your currently-installed version gets around that problem. Of course, you could also just use the prebuilt binaries I've provided in my yum repo and then you don't have to rebuild anything.

    As to your fork() issue, I'd suggest looking at the config.log output to find out what really caused that failure. My guess is that you're missing a "-devel" package.

  65. 65 Harabanar

    Ok .. what am I actually looking for :D

  66. 66 Peter

    I cant not remove php-sqlite2 due to some error:
    # rpm -e php-sqlite2-5.1.6-200705230945
    error: Failed dependencies:
    any-php-sqlite2 is needed by (installed) sb-publish-3.0.1-200705230947.noarch

    Seems like plesk need it.

    So what do i need to do to solve this?

    Thanks

  67. 67 Jason

    @Harabanar,

    Open the config.log file and start searching, from the bottom towards the top, for lines that contain "error".

    @Peter,

    Well, again, I don't know where that 'php-sqlite2' package came from. SQLite connectivity is built into 'php-pdo' but it is not identical to the SQLite connectivity from PHP 4 (which I believe was called 'sqlite2').

    'sb-publish' is part of Plesk's "Site Builder". If you don't use it then you're probably safe in removing both. If you do, you could take a chance that it also works with the connectivity exposed by 'php-pdo'. If it's something you can't live without then I'd suggest not moving forward with the update.

  68. 68 Andrew

    I'm looking through srpm - can't see oci added. And i missing smth ?

  69. 69 Mike

    I used your packages to add mysql and php (5.2.2) to my RHEL4 machine. I went to actually use PHP with mysql today and of course the php-mysql extension is not there (and it no longer is compiled into php). Can you tell me how to get the php-mysql RPMs for php 5.2.2 or the 5.2.4 that I could upgrade to? Any help out of RPM hell is appreciated.

    Mike

  70. 70 Jason

    @Mike,

    You haven't mentioned how you've installed PHP on your system. If you're using my yum repository then the newest version available is 5.2.5 and the 'php-mysql' package is available. If you compiled it yourself then you should check your build output folder as there should be a file that starts with 'php-mysql'.

Leave a Reply

Note: This post is over 11 months 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.






Close
Powered by ShareThis