----- Original Message ----- From: "David Yee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, September 08, 2002 10:59 PM Subject: [PHP] Upgrading PHP on Redhat
> Hi all. What's the correct procedure to upgrade PHP (in this case 4.0.6) on > a Red Hat system? Usually I just get the PHP tarball compile it myself but > for this particular machine I just want to upgrade the Redhat PHP that's on > the system. As you guys know Redhat puts its PHP (and Apache) files in > different locations- e.g. php.ini is in /etc. I looked for some RPMs but I > kept getting failed dependencies when trying to install them- e.g.: > > # rpm -Uvh php-4.1.2-7.2.4.i386.rpm > error: failed dependencies: > php = 4.0.6-15 is needed by php-manual-4.0.6-15 > php = 4.0.6-15 is needed by php-imap-4.0.6-15 > php = 4.0.6-15 is needed by php-ldap-4.0.6-15 > php = 4.0.6-15 is needed by php-mysql-4.0.6-15 > php = 4.0.6-15 is needed by php-odbc-4.0.6-15 > php = 4.0.6-15 is needed by php-pgsql-4.0.6-15 > > I'm not an expert in using rpm so I'm probably doing something completely > wrong??? > > David > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > This is a small script with step by step guide to recompile php from php source tarball, to be full suitable for your distribution (RH 7.3 in my case) ------------ cut here ------- # config_php.sh # This is simple 11 step guide to recompile PHP from tarball,suitable # for your distro (RedHat 7.3 im my case, users of other distributions/versions should follow steps in comment and create your own script... ) # # (assuming, you have php tarball installed, of course,and that you read the small notes on the end of this file) # # 1: Get you PHP configuration .... Create script, that calls phpinfo() and see its output # in the 3rd line you could see "Configure command". Copy it all down to your clipboard # 2: create shell script config_php.sh, insert there content of prevoiusly stored clipboard, # remove all apostrofs ( ' ), make sure, that everything is on one single line. # (Yes, this is the way, how this script was created) # 3: get your distro CDs, ie that contain RPMs # 4: copy the script config_php.sh in the top level of your php sourcecode tree and run it. # 5: If you see any error like "extension blabla not found" you have to chose if you need it or not # 6: if you need it, just get your distros CD and instal blablabla-devel.versionnumer.machine.rpm # Maybe you should install some other rpms too, to solve the dependencies, # probably it take a lot of disk space # 7: if you don't need the particular extension , edit your config_php.sh script , # deleting from ./configure line "--with-blabla=something" and run your script config_php.sh again # 8: once script ended with no errors, you can do a standard MAKE procedure # 9: make # 10: make install # 11 restart your system.... or just the affected things (db engines, web servers etc) # and finito. This is called ZAVES (zadny velky srani) in czech.... # # A small note 1. Sometimes make_install may not overwrite your old extensions and create other directory # whwere extensions lives. You must copy the extensions where they should be manually . ie # /usr/lib/2002xxx contain something like extension_name.so and all content of that directory # MUST be copied by hand to /usr/lib/php4 # A small note 2: You MUST have apache-devel installed to have core feature - "apxs", # that allow you to recompile PHP (and any other apache modules) without recompilling apache itself echo "Redhat PHP configconfig " ./configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --included ir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localsta tedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir =/usr/share/info --prefix=/usr --with-config-file-path=/etc --enable-f orce-cgi-redirect --disable-debug --enable-dbg=shared --with-dbg-profi ler --enable-pic --disable-rpath --enable-inline-optimization --with -bz2 --with-db3 --with-curl --with-dom=/usr --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd- native-ttf --with-ttf --with-gdbm --with-gettext --with-ncurses -- with-gmp --with-iconv --with-jpeg-dir=/usr --with-mm --with-openssl --with-png --with-pspell --with-regex=system --with-xml --with-exp at-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-d ebugger --enable-exif --enable-ftp --enable-magic-quotes --enable-sa fe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable- discard-path --enable-track-vars --enable-trans-sid --enable-yp --en able-wddx --without-oci8 --with-imap=shared --with-imap-ssl --with-k erberos=/usr/kerberos --with-ldap=shared --with-mysql=shared,/usr --wi th-pgsql=shared --with-snmp=shared,/usr --with-snmp=shared --enable-uc d-snmp-hack --with-unixODBC=shared --enable-memory-limit --enable-bcma th --enable-shmop --enable-versioning --enable-calendar --enable-dbx --enable-dio --enable-mcal --enable-mbstring --enable-mbstr-enc-tra ns --with-apxs=/usr/sbin/apxs -------- cut here ---- I used described steps for my server and it works well and i hope, that it may be useful for somebody else. No warranthy of any kind. --- Odchozí zpráva neobsahuje viry. Zkontrolováno antivirovým systémem AVG (http://www.grisoft.cz). Verze: 6.0.385 / Virová báze: 217 - datum vydání: 4.9.2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php