Just managed to compile and install the mailparse extension under Redhat ES5 which doesn't provide an rpm.
The pecl install command wont run on a normal Redhat ES install for a load of reasons. main ones being /tmp doesn't allow execution of script (but you could use mount -o remount,exec /tmp) ; the mbstring module detect can be overridden with the pecl -n switch but you will still need access to the mbstring header files.
A workable solution is-
Code:
wget "http://pecl.php.net/get/mailparse-2.1.4.tgz"
tar xfvz mailparse-2.1.4.tgz
cd mailparse-2.1.4
phpize
./configure
but before 'make' you will need the mbstring headers. get from the same version as your version of PHP, (I got them from redhat's srpm)
extract the tar.gz.
Code:
cd php-5.1.6/ext/
cp -a mbstring ~/mailparse-2.1.4/ext/
then in mailparse-2.1.4
Code:
make
[si@havana modules]$ file mailparse.so
mailparse.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped
[si@havana modules]$
install it......
Code:
[si@havana modules]$ sudo su
[root@havana modules]# cp mailparse.so /usr/lib64/php/modules/
[root@havana modules]# echo "extension=mailparse.so" > /etc/php.d/mmailparse.ini
note that I've called the ini file '
mmailparse.ini' as the php.d ini files are loaded in alphabetical order. Mailparse needs mbstring so it needs to be loaded first.
or else you will get a warning like ......
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mailparse.so' - /usr/lib64/php/modules/mailparse.so: undefined symbol: mbfl_name2no_encoding in Unknown on line 0
reload apache and check the output of phpinfo() to check it has loaded.