No announcement yet.

How to update PHP on RH9?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to update PHP on RH9?

    Hi all... I'm running PHP 4.2.2 on RH9... what is the best/easiest/safest way to upgrade to a newer version (4.4.1)? This is a live server with backups, however no fail-over if I crash it horribly...


  • #2
    EDIT: I just read that you said this was a live server... I guess if you don't know what you are doing you could really screw something up. Please seriously think about trying my "easiest/safest" way first if upgrading is necessary.

    The best way:

    Uninstall all RPM packages that contain "php" in the name. (Type: rpm -qa | grep php at prompt to see all the packages like this.)

    After you rpm -e php-package-here you go to and download the latest version. For more instructions, type pico INSTALL while browsing the PHP directory you just downloaded (and unpackaged).

    The easiest/safest:

    If you are using Apache as an RPM package too, you are probably a newbie (no offence), and your best bet would be to visit and download the latest "php" package. To upgrade, after you download it, type rpm -Uvh php-whatever.rpm

    Hope that helps.


    • #3
      No offense... I am a newbie when it comes to Linux. I dug all around RPM find, and I'm confused. I could not find PHP for RH9 any newer than 4.2.2... and for Apache, nothing newer than what I already have.

      Apache v2.0.40 is what I have.


      • #4
        Well, not sure if it helps, but the following works fine on RHEL3 replacing an existing PHP RPM installation (so I think it *should* work on RH9 as well).

        After downloading and extracting the latest source:
        *** use at your own risk ***
        # ./configure \
        --host=i686-redhat-linux-gnu \
        --build=i686-redhat-linux-gnu \
        --target=i386-redhat-linux \
        --program-prefix= \
        --prefix=/usr \
        --exec-prefix=/usr \
        --bindir=/usr/bin \
        --sbindir=/usr/sbin \
        --sysconfdir=/etc \
        --datadir=/usr/share \
        --includedir=/usr/include \
        --libdir=/usr/lib \
        --libexecdir=/usr/libexec \
        --localstatedir=/var \
        --sharedstatedir=/usr/com \
        --mandir=/usr/share/man \
        --infodir=/usr/share/info \
        --cache-file=../config.cache \
        --with-config-file-path=/etc \
        --with-config-file-scan-dir=/etc/php.d \
        --enable-force-cgi-redirect \
        --disable-debug \
        --enable-pic \
        --disable-rpath \
        --enable-inline-optimization \
        --with-bz2 \
        --with-db4=/usr \
        --with-curl \
        --with-exec-dir=/usr/bin \
        --with-freetype-dir=/usr \
        --with-png-dir=/usr \
        --with-gd \
        --enable-gd-native-ttf \
        --without-gdbm \
        --with-gettext \
        --with-ncurses=shared \
        --with-gmp \
        --with-iconv \
        --with-jpeg-dir=/usr \
        --with-openssl \
        --with-png \
        --with-pspell \
        --with-xml \
        --with-expat-dir=/usr \
        --with-dom=shared,/usr \
        --with-dom-xslt=/usr \
        --with-dom-exslt=/usr \
        --with-xmlrpc=shared \
        --with-pcre-regex \
        --with-zlib \
        --with-layout=GNU \
        --enable-bcmath \
        --enable-exif \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-sockets \
        --enable-sysvsem \
        --enable-sysvshm \
        --enable-track-vars \
        --enable-trans-sid \
        --enable-yp \
        --enable-wddx \
        --with-pear=/usr/share/pear \
        --with-imap=shared \
        --with-imap-ssl \
        --with-kerberos \
        --with-ldap=shared \
        --with-mysql=shared,/usr \
        --with-mcrypt=shared \
        --with-mhash=shared \
        --enable-xslt=shared \
        --with-xslt-sablot=shared,/usr \
        --with-sablot-js=shared,/usr \
        --with-pgsql=shared \
        --with-snmp=shared,/usr \
        --with-snmp=shared \
        --enable-ucd-snmp-hack \
        --with-unixODBC=shared,/usr \
        --enable-memory-limit \
        --enable-shmop \
        --enable-calendar \
        --enable-dbx \
        --enable-dio \
        --enable-mbstring=shared \
        --enable-mbstr-enc-trans \
        --enable-mbregex \
        --with-mime-magic=/usr/share/magic.mime \
        --with-pic \
        # make
        # make install
        If it's the first time you are compiling PHP you will most likely need to fill a lot of dependencies. E.g. make sure that you have installed libpng-devel, libjpeg-devel, freetype-devel, etc. RPMs.
        Or simply remove those configure options you are having problems with. You can type "./configure --help" for more information.
        Planning to continue using VB 3.8 post EOL? Then join the VB 3.8 Forever group and!


        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.