hi
I have been trying to install the new extensions mcrypt and mhash to my PHP4 on Linux Redhat. As far as the extensions are concerned, everything seemed to work, I can see the mcrypt.so and mhash.so in the appropriate directory. However, it seems I have to recompile php --with mcrypt and --with mhash. How do I do this? Is it necessary to get rid of my old php installation and install the whole thing again?

If so, what exactly do I have to do in order to enable mhash and mcrypt?

thanks for helping me
Katrin

    Hi,

    which RedHat version is installed ? Additionally, create a little phpinfo() script.

    The output contains one line with the configure options (near the top of the page). Post that configuration options.

    Thomas

      Hi, I use
      Redhat Enterprise Linux 2.4.21-20 and the output of phpinfo() is:

      './configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--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-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2filter=/usr/sbin/apxs'

      However, as I said, the --with-mcrypt and --with-mhash options are not yet there.... Hope you can help me!

      thanks
      Katrin

        Ok,

        there are three ways:

        1. there are some websites that have rpm packages with mhash and mcrypt extensions available for RedHat 9. I don't know if there are any mhash packages for RedHat Enterprise Linux

        2. Recompile PHP using the source package. Install the source package, add --with-mhash and --with-mcrypt to the spec file and rebuild the package

        3. download the matching source tarball from php.net and compile a minimum php with options --with-mhash=shared and --with-mcrypt=shared using the same basic configure options (prefix,program-prefix and so on). compile php but do not run 'make install'. Copy the two shared extension libraries to the directory where the other PHP extensions are and enable the two extensions in php.ini.

        Thomas

          Write a Reply...