Announcement

Collapse
No announcement yet.

HOW TO: Install PHP 5.2 through yum

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HOW TO: Install PHP 5.2 through yum

    As many of you know, the version of PHP that ships with CentOS 5 is very outdated. One question we are constantly asked is "How can I install PHP 5.2 on my InterWorx server?". Wouldn't it be a lot easier if you could just add them to yum? Of course it is, so here's how to do it. ;)

    Please note these RPMs are Unsupported. We will try our best to make sure that nothing breaks, but using these RPMs is at your own risk.

    1.) Create a file called iworx-unsupported.repo in /etc/yum.repos.d/
    Code:
     [root@host ~]$ emacs /etc/yum.repos.d/iworx-unsupported.repo
    2.) Enter the following, replacing cos5x with rhe5x if using RHEL 5 or rhe4x if using RHEL 4, centOS 4 users may be out of luck.
    Code:
    [iworx-unsupported]
    name=IWorx Unsupported
    baseurl=http://updates.interworx.com/iworx/RPMS/unsupported/php5/cos5x/$basearch/
    gpgcheck=0
    3.) Now run yum update.

    Code:
    [root@host ~]$ yum update
    4.) You should be greeted with the following text.

    Code:
    ==================================================================================================
     Package            Arch         Version                            Repository               Size
    ==================================================================================================
    Updating:
     php                i386         5.2.12-rhe5x.iworx.js.100          unsupported-php         3.7 M
     php-cli            i386         5.2.12-rhe5x.iworx.js.100          unsupported-php         2.7 M
     php-common         i386         5.2.12-rhe5x.iworx.js.100          unsupported-php         505 k
     php-devel          i386         5.2.12-rhe5x.iworx.js.100          unsupported-php         567 k
     php-ldap           i386         5.2.12-rhe5x.iworx.js.100          unsupported-php          57 k
     php-mysql          i386         5.2.12-rhe5x.iworx.js.100          unsupported-php         258 k
     php-pdo            i386         5.2.12-rhe5x.iworx.js.100          unsupported-php         157 k
    
    Transaction Summary
    ==================================================================================================
    Install      0 Package(s)         
    Update       7 Package(s)         
    Remove       0 Package(s)         
    
    Total download size: 7.8 M
    Is this ok [y/N]:
    Jon Daniel
    Software Engineer
    InterWorx-CP | http://interworx.com

  • #2
    Thanks for posting this. Perfect timing as I'm just getting started to upgrade my forums to vBulletin 4, which requires PHP 5.2+.

    If by some chance upgrading to PHP 5.2 does cause problems with scripts or whatever, what would be the process to revert back to the previous default supported version of PHP? Or rather, how would we undo this change if necessary?
    ...

    Comment


    • #3
      To revert the PHP update to the base version installed by CentOS, you just need to run the following command. Note: You may need to specify additional packages if you installed any other php extensions not listed here.

      Code:
      yum downgrade php php-cli php-common php-devel php-ldap php-mysql php-pdo
      Jon Daniel
      Software Engineer
      InterWorx-CP | http://interworx.com

      Comment


      • #4
        AND - remove the new repo, cause otherwise the upgrade will just happen the next time someone runs "yum upgrade" :)

        Comment


        • #5
          Tried these instructions today and it isn't working. The one thing I see is this error:

          Code:
          --> Finished Dependency Resolution
          5:php-pear-5.2.9-100.rhe5x.iworx.steadfast.i386 from installed has depsolving problems
            --> Missing Dependency: php = 5.2.9-100.rhe5x.iworx.steadfast is needed by package 5:php-pear-5.2.9-100.rhe5x.iworx.steadfast.i386 (installed)
          Error: Missing Dependency: php = 5.2.9-100.rhe5x.iworx.steadfast is needed by package 5:php-pear-5.2.9-100.rhe5x.iworx.steadfast.i386 (installed)
          Not sure what this is or how to fix it. Suggestions?

          Comment


          • #6
            We would need more information to determine what is wrong. If you bought your license through us you can open a support ticket and we can take a look.
            Daniel Motles
            Technical Support
            InterWorx-CP | http://interworx.com/

            Comment


            • #7
              I upgraded my CentOS 5.5 to PHP 5.2 using this method and worked well. Only hiccup I ran into was I got a warning in NodeWorx on the web server page:
              "Warning, mod_php and mod_suphp are both enabled, this is a security risk!"

              I just restarted apache and then the warning was gone and everything seems fine running on suPHP.
              [ JUSTIN ]
              [ OFF unit ]
              [ WEB DESIGN / DEVELOPMENT, GRAPHIC DESIGN, OTHER STUFF
              ]

              Comment


              • #8
                I-ve seen an update in iworx repository for php 5.2.17. I made an YUM UPDATE, but I've dependencies error with php5.2.14 iworx :

                yum update
                Excluding Packages from Les RPM de remi pour Enterprise Linux 5 - i386
                Finished
                Setting up Update Process
                Resolving Dependencies
                --> Running transaction check
                ---> Package php.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-cli.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                --> Processing Dependency: php-common = 5.2.14-1.w5 for package: php-pspell
                ---> Package php-common.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-devel.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-gd.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-imap.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-mbstring.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-mcrypt.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-mhash.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-mysql.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-odbc.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-pdo.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-soap.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                ---> Package php-xml.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
                --> Finished Dependency Resolution
                php-pspell-5.2.14-1.w5.i386 from installed has depsolving problems
                --> Missing Dependency: php-common = 5.2.14-1.w5 is needed by package php-pspell-5.2.14-1.w5.i386 (installed)
                Error: Missing Dependency: php-common = 5.2.14-1.w5 is needed by package php-pspell-5.2.14-1.w5.i386 (installed)
                You could try using --skip-broken to work around the problem
                You could try running: package-cleanup --problems
                package-cleanup --dupes
                rpm -Va --nofiles --nodigest
                The program package-cleanup is found in the yum-utils package.
                If you have an idea ?

                Thank you :)
                French Webhoster
                SOS-Data - Backup - Hosting - Infrastructure

                Comment


                • #9
                  It looks like you have differents source installation of php..
                  You have php-pspell that ask for php-common 5.2.14.w5 which isn't here as you have updated it as php-common-iworx...


                  I'd uninstall all no interworx php, then install them from the iworx repo (unsuported). Or at least uninstall no need php rpm (pspell is it really needed ?)

                  Also, Some cmd as rpm -qa | grep php / or yum list php* should help.

                  If you need special feature not provided, the best way may be to update the src.rpm provided by interworx here http://updates.interworx.com/iworx/R...ed/php5/cos5x/ (5.2.17 & 5.3.3)
                  Last edited by netipro; 02-24-2011, 02:15 PM.

                  Comment


                  • #10
                    Originally posted by Gimly View Post
                    I-ve seen an update in iworx repository for php 5.2.17. I made an YUM UPDATE, but I've dependencies error with php5.2.14 iworx :
                    If you have an idea ?
                    Thank you :)
                    You can use this command

                    yum update php php-cli php-common php-devel php-ldap php-mysql php-pdo

                    Comment


                    • #11
                      Originally posted by IWorx-Tim-Pgh View Post
                      AND - remove the new repo, cause otherwise the upgrade will just happen the next time someone runs "yum upgrade" :)
                      For folks who installed using the experimental repo, what is best practice for regular scheduled updates? Turn them off and continue updating with the experimental repo? If so, is there a way to schedule OS updates only?

                      Thanks.

                      Comment


                      • #12
                        Originally posted by sysnop View Post
                        For folks who installed using the experimental repo, what is best practice for regular scheduled updates? Turn them off and continue updating with the experimental repo? If so, is there a way to schedule OS updates only?

                        Thanks.
                        What do you mean by "experimental repo" - the iworx unsupported repo? Or another 3rd party repo like atomic or remi?
                        Daniel Motles
                        Technical Support
                        InterWorx-CP | http://interworx.com/

                        Comment


                        • #13
                          I mean the unsupported iworx repo. Thought I saw it referred to as "experimental" somewhere in the forums but I can see how the iworx team might not care for that reference.

                          Comment


                          • #14
                            Oh I guess it can be called experimental - you really shouldn't have to worry about changing anything re: automatic updates unless you are using another 3rd party repository. Since CentOS/RHEL are running older versions of PHP they won't ever overwrite the unsupported iworx PHP.
                            Daniel Motles
                            Technical Support
                            InterWorx-CP | http://interworx.com/

                            Comment


                            • #15
                              I always thought hosting control panels were capable of controlling what version of php was run on the server via the interface. many popular php scripts (mainly the latest version of wordpress) are unable to be installed on 5.1 anymore. Considering php 5.3 has been out for 2 years now, Is interworx planning on providing php5.2 out of the box and supported in the near future?

                              Comment

                              Working...
                              X