php 5.2.3 + mailparse
php 5.2.3 + mailparse
Hopefully someone can help me out here, this one's been driving me nuts.
I need to install php-pecl-mailparse on Centos 5 with PHP 5.2.3, but the only rpm I can find is
php-pecl-mailparse-2.1.1-1.el5.rf from rpmforge
It installs fine with php-5.2.3-4.el5.art but php refuses to load the module with the following error.
PHP Warning: PHP Startup: mailparse: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to match\n in Unknown on line 0
So I guess my question is anyone know of a MailParse rpm that will work with art?
I need to install php-pecl-mailparse on Centos 5 with PHP 5.2.3, but the only rpm I can find is
php-pecl-mailparse-2.1.1-1.el5.rf from rpmforge
It installs fine with php-5.2.3-4.el5.art but php refuses to load the module with the following error.
PHP Warning: PHP Startup: mailparse: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to match\n in Unknown on line 0
So I guess my question is anyone know of a MailParse rpm that will work with art?
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
You or Scott would have to build it. Or you could use the pear command to build and install PECL extensions.
Lemonbit Internet Dedicated Server Management
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
If everybody is doing it, then why do I feel like documentation on getting started with building rpms (and mock and friends, etc.) is scattered all over the web? I rebuild an rpm from time to time, but nothing fancy. I just haven't found the time to find all the pieces and put together a good build system and learn about building rpms for all these different platforms (though we're using almost exclusively CentOS 4 and 5).scott wrote:or breun... come on... make an rpm... do it... do it... everybody does it.... it'll make you feeeeel goooood.**
Maybe you could do a screencast of you and your setup and building PHP packages for Plesk for instance sometimes?
You are absolutely correct, sir.** This type of peer pressure probably doesn't work in the Netherlands.
Lemonbit Internet Dedicated Server Management
Some sort of tutorial would be great.
Although I'm gonna have to head back to the centos php 5.1 rpm's. I did try compiling mailparse using pear, but I'm now getting errors with missing symbols.
Anyone know if I can removing the php 5.2 rpm's using --nodeps will allow me to reinstall php 5.1 without screwing plesk?
Although I'm gonna have to head back to the centos php 5.1 rpm's. I did try compiling mailparse using pear, but I'm now getting errors with missing symbols.
Anyone know if I can removing the php 5.2 rpm's using --nodeps will allow me to reinstall php 5.1 without screwing plesk?
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
You might need to install some extra packages before pear can compile the PECL extension. The error messages will give you a clue about what is needed. So, what's the error message?
Alternatively, if you want to downgrade, you can download the packages for the older version and use rpm -Uvh --oldpackage *.rpm to replace the packages.
Alternatively, if you want to downgrade, you can download the packages for the older version and use rpm -Uvh --oldpackage *.rpm to replace the packages.
Lemonbit Internet Dedicated Server Management
Thanks breun,
Yes error message would help! Although I gave up because I can't really find any reference anywhere to this symbol
/usr/lib/php/modules/mailparse.so: undefined symbol: mbfl_name2no_encoding in Unknown on line 0
It looks mbstring related to me, although it's installed and working, so it's a bit of a mystery.
Yes error message would help! Although I gave up because I can't really find any reference anywhere to this symbol
/usr/lib/php/modules/mailparse.so: undefined symbol: mbfl_name2no_encoding in Unknown on line 0
It looks mbstring related to me, although it's installed and working, so it's a bit of a mystery.
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
You probably need at least the php-devel package installed (and autoconf, automake and libtool).
Lemonbit Internet Dedicated Server Management
mailparse won't compile
I'm having the same problem (Can't get mailparse installed). On top of which, when I try to use pecl to compile the extension, it tells me that I need mbstring. I have php-mbstring 5.2.5 from ART, so I don't understand why it is asking for it again.
I'm running php 5.2.5 from ART.
Plesk needs mbstring, so uninstalling it/reinstalling it really isn't an option.
Any help is greatly appreciated,
Rob
I'm running php 5.2.5 from ART.
Plesk needs mbstring, so uninstalling it/reinstalling it really isn't an option.
Any help is greatly appreciated,
Rob
Got this working I'll share my solution for others (and my future reference.)
I found a post on another forum that said, since mbstring shows up in phpinfo, I could override the requirement safely. This is because the recent versions of PHP5 have a bug with the mbstring headers:
http://pecl.php.net/bugs/bug.php?id=6239
So, per the instructions, I changed
to
in the mailparse.c file
Then I manually compiled it:
and everything works once the extension=mailparse.so is in the php.ini file (It was already there from my prior attempts to enable it.)
Hope that this helps someone!
Rob
I found a post on another forum that said, since mbstring shows up in phpinfo, I could override the requirement safely. This is because the recent versions of PHP5 have a bug with the mbstring headers:
http://pecl.php.net/bugs/bug.php?id=6239
So, per the instructions, I changed
Code: Select all
/* just in case the config check doesn't enable mbstring automatically */
#if !HAVE_MBSTRING
#error The mailparse extension requires the mbstring extension!
#endif
Code: Select all
/* just in case the config check doesn't enable mbstring automatically */
#if !HAVE_MBSTRING && false
#error The mailparse extension requires the mbstring extension!
#endif
Then I manually compiled it:
Code: Select all
$ cd extname
$ phpize
$ ./configure
$ make
# make install
Hope that this helps someone!
Rob
-
- New Forum User
- Posts: 1
- Joined: Thu Jun 26, 2008 8:49 am
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-
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.
then in mailparse-2.1.4
install it......
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.
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: Select all
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
extract the tar.gz.
Code: Select all
cd php-5.1.6/ext/
cp -a mbstring ~/mailparse-2.1.4/ext/
Code: Select all
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]$
Code: Select all
[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
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.
I also need mailparse on a server with Centos 5 and PHP 5.1.6, a helpdesk application requires it (Cerberus Helpdesk 4).
I don't use ASL yet.
Right now yum doesn't have it.
If I install ASL, is it available from there yet or would I still need to compile it myself?
Update: I figured out that if I add the RPMforge repo I can get mailparse easily with yum install php-pecl-mailparse
I don't use ASL yet.
Right now yum doesn't have it.
If I install ASL, is it available from there yet or would I still need to compile it myself?
Update: I figured out that if I add the RPMforge repo I can get mailparse easily with yum install php-pecl-mailparse
Last edited by mrwilson on Tue Aug 19, 2008 10:58 am, edited 1 time in total.