LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-13-2017, 02:47 PM   #1
tallship
Member
 
Registered: Jul 2003
Location: On the Beaches of Super Sunny Southern San Clemente, California USA
Distribution: Slackware - duh!
Posts: 534
Blog Entries: 3

Rep: Reputation: 118Reputation: 118
Question How can I install php mailparse extension on Slackware 14.2?


I'm trying to install mailparse as ity it's required by a web based app that isn't supported running under php 7 (actually, there is a beta I'm testing that is currently being tested under php 7 but I'm testing that under php 5.6).

Currently, php 5.6.19 is installed and I've tried the following:

Code:
pecl install mailparse # (fails - php 7 is required)
pecl install mailparse-2.1.6 # (fails - dep = mbstring)
pear install mailparse-2.1.6.tgz # (fails on make rfc822.c)
pear -f install pecl/mailparse-2.1.6 # (make fails - err 127)
mbstring is installed and active. I know that if I'm successful installing mailparse that I need to load it before mbstring in php.ini.

Here's exactly what I get when I try to do a simple install of it:

Code:
# pecl install mailparse
pecl/mailparse requires PHP (version >= 7.0.0), installed version is 5.6.19
pecl/mailparse requires PHP extension "mbstring"
No valid packages found
install failed
pecl doesn't seem to recognize that mbstring is installed and active but php -m and php --ri do.

Why is this?

Code:
# php --ri mbstring                    
mbstring

Multibyte Support => enabled
Multibyte string engine => libmbfl
HTTP input encoding translation => disabled                             libmbfl version => 1.3.2                                                
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) backtrack check => On
Multibyte regex (oniguruma) version => 5.9.5

Directive => Local Value => Master Value
mbstring.language => neutral => neutral
mbstring.detect_order => no value => no value
mbstring.http_input => no value => no value
mbstring.http_output => no value => no value
mbstring.internal_encoding => no value => no value
mbstring.substitute_character => no value => no value                   mbstring.func_overload => 0 => 0
mbstring.encoding_translation => Off => Off
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) =[0] 0:su- 1:[tmux]* 2:t
Since php 7 seems to be required for the latest three versions of mailparse, i would have considered that perhaps I need to install an even earlier version to meet compatibility with the installed mbstring, but pecl doesn't even recognize that mbstring is installed at all.

mailparse is required for this app with respect to mail piping for their support/sales/billing department ticketing functions.

Anyway, what suggestions does anyone have for how I can install mailparse? The particular app I'm working with needs this for mail piping for sales and support and other departments in their software.

Last edited by tallship; 01-13-2017 at 03:18 PM. Reason: tried to fix formatting, if this doesn't work will delete and start from scratch.
 
Old 01-13-2017, 03:17 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
It might just be easier to upgrade your php to v7, assuming you don't have anything that relies on older versions. There's a thread on LQ discussing building php7 on Slackware.

http://www.linuxquestions.org/questi...p7-4175588848/
 
1 members found this post helpful.
Old 01-13-2017, 03:29 PM   #3
tallship
Member
 
Registered: Jul 2003
Location: On the Beaches of Super Sunny Southern San Clemente, California USA
Distribution: Slackware - duh!
Posts: 534

Original Poster
Blog Entries: 3

Rep: Reputation: 118Reputation: 118
Quote:
Originally Posted by bassmadrigal View Post
It might just be easier to upgrade your php to v7, assuming you don't have anything that relies on older versions. /
Thank you for that, and yes, last week I read over that and another thread (where you and darth vader broke out the claws).

I have a couple of concerns before going that route though.

1.) If I do this, I don't want to break anything for when Patrick's changelog shows that he's updated -current to php 7.

2.) I would want to support anything that *may* not be stable under php7 by having both the stock, Slackware compiled version of php 5.6.x AND php 7 selectable - I have a few dozen VirtualHosts on the particular machine, and certainly don't want to head down a rabbit hole of breakages that might not even rear their ugly heads until some obscure usage of an app presents.

I do want to make sure that I can follow -current as usual, eventually discarding any custom installations of php I make in favor of what will eventually make it into the official Slackware -current changelog.

Thanks again @bassmadrigal

.
 
Old 01-13-2017, 04:29 PM   #4
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
I don't know if there is anything that wouldn't be supported in php-7 that is in php-5, but if you end up wanting to use php-7 I have a SlackBuild for it here: https://github.com/Skaendo/slackbuilds. This SlackBuild is adapted from Pat's "official" SlackBuild for php-5 and you should know that you will need the alpine sources when you compile.

I use php-7 and no one has complained to me yet. (my small audience is mostly family and close friends)

Last edited by Skaendo; 01-13-2017 at 04:30 PM.
 
Old 01-13-2017, 06:33 PM   #5
tallship
Member
 
Registered: Jul 2003
Location: On the Beaches of Super Sunny Southern San Clemente, California USA
Distribution: Slackware - duh!
Posts: 534

Original Poster
Blog Entries: 3

Rep: Reputation: 118Reputation: 118
Thanks I may just try that and bite the bullet. I'll have to address the issue with mailparse, but maybe if I use your Slackbuild I won't have the failure resulting from trying to install an older version w/pecl...

And, w/packages I can just revert easily and then whenever Slackware adopts php 7 I can switch to that.

I really didn't want to go about installing mailparse by hand and then have to deal with kruft laying around later in a year or two.

Any additional pointers in addition to the source for pine?
 
Old 01-13-2017, 07:15 PM   #6
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
Quote:
Originally Posted by tallship View Post
Any additional pointers in addition to the source for pine?
I just have the php files in /home/*user*/php and the alpine sources in /home/*user*/alpine, it seems to build fine like that. Also, I upgrade all three packages that are created; alpine, imapd and php. (imapd is created with alpine)

I've been building/running like that on my little home server with no issues.

You'll probably want to blacklist those three in slackpkg until the time that Slackware ships with php-7.

Last edited by Skaendo; 01-13-2017 at 07:36 PM.
 
Old 01-14-2017, 02:07 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
@OP

You can install mailparse-2.1.6 that apparently works with php-5.6
Code:
pecl install mailparse-2.1.6
Regards
 
Old 01-15-2017, 03:12 PM   #8
tallship
Member
 
Registered: Jul 2003
Location: On the Beaches of Super Sunny Southern San Clemente, California USA
Distribution: Slackware - duh!
Posts: 534

Original Poster
Blog Entries: 3

Rep: Reputation: 118Reputation: 118
Quote:
Originally Posted by bathory View Post
@OP

You can install mailparse-2.1.6 that apparently works with php-5.6
Code:
pecl install mailparse-2.1.6
Regards
Hi @bathory, I listed that above in the original post with the bizarre error I received, but realize it was buried in the details.

Here's the actual output of when I had originally tried that:

Code:
# pecl install mailparse-2.1.6
pecl/mailparse requires PHP extension "mbstring"
No valid packages found
install failed
One would think it would be as simple and straight-forward as that, and I even tried pear w/ a force flag to invoke the installation (also listed above in the original post) and installing from the locally downloaded mailparse-2.1.6.

I have no idea why it thinks that mbstring isn't installed. PHP knows it is, but pecl doesn't, and when I tried to compile/install from the locally downloaded extension that failed at some point in make as well.

Allthough this would be the ideal way for me, I'm thinking on this for a bit, leaning towards using @skaendo's Slackbuild and then just blacklisting as he suggested.

One thought, however, were you able to do the simple install w/pecl on one of your systems?

.
 
Old 01-16-2017, 02:56 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
One thought, however, were you able to do the simple install w/pecl on one of your systems?
Yes I've installed mailparse-2.1.6 with pecl before posting the previous answer. The only difference is that I'm running php-5.6.29 compiled from source using the "--enable-mbstring" option, if that matters.

FYI, I've also tested the phpize method (compile mailparse-2.1.6 from source) and it also worked.
 
1 members found this post helpful.
  


Reply

Tags
mailparse, mbstring, php-5.6.19, slackware 14.2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I install the missing the mysqli extension for PHP to Mysql? bscho Linux Mint 3 07-07-2016 01:33 PM
install PHP with imap extension said76 Linux - Server 1 09-10-2014 04:56 PM
how to install php zip extension on a server kakarlamadhu Linux - Newbie 1 06-28-2013 12:29 AM
[SOLVED] Install ZIP extension for php on CentOS phpdev Linux - Server 6 01-06-2012 11:57 AM
How to install php extension? strangevarius SUSE / openSUSE 0 04-11-2007 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration