store | blogs | forums | twitter | facebook | wiki | downloads | support portal
Atomic Secure Linux
It is currently Sat Oct 25, 2014 8:38 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: php 5.2.3 + mailparse
Unread postPosted: Thu Oct 04, 2007 11:30 am 
Offline
Forum User
Forum User

Joined: Thu Oct 04, 2007 11:17 am
Posts: 5
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?


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Oct 05, 2007 7:02 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
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


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Oct 05, 2007 7:12 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7943
Location: earth
or breun... come on... make an rpm... do it... do it... everybody does it.... it'll make you feeeeel goooood.**



** This type of peer pressure probably doesn't work in the Netherlands.


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Oct 05, 2007 7:20 am 
Offline
Forum User
Forum User

Joined: Thu Oct 04, 2007 11:17 am
Posts: 5
hahaha

Well I tell you one thing, me compiling an RPM will not make me feel good. Somebody hide the razor blades!

May look at the pear option when I have had more than 2 hours sleep :D


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Oct 05, 2007 7:40 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
scott wrote:
or breun... come on... make an rpm... do it... do it... everybody does it.... it'll make you feeeeel goooood.**


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).

Maybe you could do a screencast of you and your setup and building PHP packages for Plesk for instance sometimes? 8)

Quote:
** This type of peer pressure probably doesn't work in the Netherlands.


You are absolutely correct, sir.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Oct 05, 2007 1:51 pm 
Offline
Forum User
Forum User

Joined: Thu Oct 04, 2007 11:17 am
Posts: 5
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?


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Oct 05, 2007 2:22 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
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.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject:
Unread postPosted: Sat Oct 06, 2007 3:36 am 
Offline
Forum User
Forum User

Joined: Thu Oct 04, 2007 11:17 am
Posts: 5
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.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Oct 07, 2007 6:38 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
You probably need at least the php-devel package installed (and autoconf, automake and libtool).

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject:
Unread postPosted: Tue Oct 09, 2007 4:04 am 
Offline
Forum User
Forum User

Joined: Thu Oct 04, 2007 11:17 am
Posts: 5
It's a mystery it seem's. I have all these packages installed, all I can think is there is something about the version of mbstring rpm I have... I may try upgrading to the 5.2.4 rpms in testing, never know I might get lucky!


Top
 Profile  
 
 Post subject: mailparse won't compile
Unread postPosted: Wed Mar 12, 2008 5:21 pm 
Offline
Forum User
Forum User

Joined: Thu Jan 24, 2008 6:25 pm
Posts: 10
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


Top
 Profile  
 
 Post subject:
Unread postPosted: Wed Mar 12, 2008 6:27 pm 
Offline
Forum User
Forum User

Joined: Thu Jan 24, 2008 6:25 pm
Posts: 10
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
Code:
/* just in case the config check doesn't enable mbstring automatically */
#if !HAVE_MBSTRING
#error The mailparse extension requires the mbstring extension!
#endif

to
Code:
/* just in case the config check doesn't enable mbstring automatically */
#if !HAVE_MBSTRING && false
#error The mailparse extension requires the mbstring extension!
#endif

in the mailparse.c file

Then I manually compiled it:
Code:
$ cd extname
$ phpize
$ ./configure
$ make
# make install

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


Top
 Profile  
 
 Post subject:
Unread postPosted: Thu Jun 26, 2008 10:37 am 
Offline
New Forum User
New Forum User

Joined: Thu Jun 26, 2008 8:49 am
Posts: 1
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.


Top
 Profile  
 
 Post subject:
Unread postPosted: Tue Aug 19, 2008 3:36 am 
Offline
Forum User
Forum User

Joined: Sat Jun 07, 2008 11:09 pm
Posts: 53
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


Last edited by mrwilson on Tue Aug 19, 2008 10:58 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
Unread postPosted: Tue Aug 19, 2008 10:57 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7943
Location: earth
Not in ASL, but I could add a mailparse rpm for 5.2.x in atomic.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group