Jump to content
  • 0
Serverhosh

The PHP Mailparse PECL extension is required for parsing email tickets.

Question

Hi

While adding Support Department I am getting the error - The PHP Mailparse PECL extension is required for parsing email tickets.

Me and my Team tried different ways to fix even with Upgrading PHP 7 and ioncube 6 but nothing works.. Either site getting issue or Not able to add the Support Different. Any way to fix it..

I am cPanel on my own Server so I have full access of it... Any solution would be thankful...

Many Thanks

Share this post


Link to post
Share on other sites

18 answers to this question

Recommended Posts

  • 1
50 minutes ago, Serverhosh said:

Tried.. But no luck.. :(

Your not using cPanel/WHM correctly.

  1. Login to WHM
  2. Select Module Install
  3. Select PHP pecl
  4. Then search for mailparse
  5. Install

 

I highly recommend you use CloudLinux with cPanel/WHM or even cPanel's MulitPHP Manager. 

https://documentation.cpanel.net/display/ALD/MultiPHP+Manager+for+WHM

Either solution allows you have cPanel accounts use different version of PHP. This is great for legacy applications that require specific versions of PHP or specialized setups.

 

-Adam

whm-mailparse.png

Share this post


Link to post
Share on other sites
  • 0
17 minutes ago, Licensecart said:

You need to run EasyApache4 and install the php-mailparse functions for php 7, etc. And then you have to install the PECL extension for mailparse which used to be under the Perl section on WHM but I believe they've moved it or changed it.

Tried.. But no luck.. :(

Share this post


Link to post
Share on other sites
  • 0

Hi adam,

I have done all the action as per you specified. But still unable to use mailparse. Please have a check the below error. Are you sure that blesta will works in php 7?

 

========

[11-Apr-2017 20:40:02 UTC] PHP Fatal error:  The file /home/xxxx/public_html/customer/app/app_controller.php was encoded by the ionCube Encoder for PHP 5.4 and cannot run under PHP 7.0.                                                                                                                             
 Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0

=========

Share this post


Link to post
Share on other sites
  • 0
19 minutes ago, care4servers said:

Hi adam,

I have done all the action as per you specified. But still unable to use mailparse. Please have a check the below error. Are you sure that blesta will works in php 7?

 

========

[11-Apr-2017 20:40:02 UTC] PHP Fatal error:  The file /home/xxxx/public_html/customer/app/app_controller.php was encoded by the ionCube Encoder for PHP 5.4 and cannot run under PHP 7.0.                                                                                                                             
 Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0

=========

Follow the instructions in README when you downloaded Blesta. For PHP 7 support, you have to patch the app_controller.php file. Its in the top level folder.

 

 

-Adam

 

Share this post


Link to post
Share on other sites
  • 0

I did everything as said and even read various tutorials, Installed it but still its show "not available".

So It will be really good If blesta add a alternative of this which can be available by default in any hosting company.

 

My Feature Request: https://www.blesta.com/forums/index.php?/topic/9491-alternative-of-mailparse/&do=getNewComment

Share this post


Link to post
Share on other sites
  • 0
7 hours ago, PreMadeKB said:

I did everything as said and even read various tutorials, Installed it but still its show "not available".

So It will be really good If blesta add a alternative of this which can be available by default in any hosting company.

 

My Feature Request: https://www.blesta.com/forums/index.php?/topic/9491-alternative-of-mailparse/&do=getNewComment

If your hosting provider does not offer Mailparse, then find a different one. It is standard among good hosting providers. 

-Adam

Share this post


Link to post
Share on other sites
  • 0
On 4/16/2017 at 8:15 PM, Adam said:

If your hosting provider does not offer Mailparse, then find a different one. It is standard among good hosting providers. 

-Adam

Most of hosting provider do does not use it. So changing to other provider is wast of money.

Share this post


Link to post
Share on other sites
  • 0
33 minutes ago, PreMadeKB said:

Most of hosting provider do does not use it. So changing to other provider is wast of money.

No sure why not everyone providing it. It's very Simple thing to Provide... You should have ask them. I also having problem First but with help of @Paul and @Licensecart I add the option and it's now Running Smooth.

Share this post


Link to post
Share on other sites
  • 0

Alright, so I have been searching the forum and I think this is the best topic to reply on.

I'm having this issue with Blesta. Version 3.6.1. 

Quote

The PHP Mailparse PECL extension is required for parsing email tickets.

I have ran WHM Apache4 and have followed the steps above. Whether I am installing mailparse for php 5.6 or 7.0 I get the same error:

Quote

downloading mailparse-3.0.2.tgz ...
Starting to download mailparse-3.0.2.tgz (38,206 bytes)
..........done: 38,206 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
building in /root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2
running: /root/tmp/pear/mailparse/configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/cpanel/ea-php70/root/usr
checking for PHP includes... -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib
checking for PHP extension directory... /opt/cpanel/ea-php70/root/usr/lib64/php/modules
checking for PHP installed headers prefix... /opt/cpanel/ea-php70/root/usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable mailparse support... yes, shared
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/sh /root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/libtool --mode=compile cc  -I. -I/root/tmp/pear/mailparse -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/include -I/root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/main -I/root/tmp/pear/mailparse -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/mailparse/mailparse.c -o mailparse.lo
libtool: compile:  cc -I. -I/root/tmp/pear/mailparse -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/include -I/root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/main -I/root/tmp/pear/mailparse -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/mailparse/mailparse.c  -fPIC -DPIC -o .libs/mailparse.o
/bin/sh /root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/libtool --mode=compile cc  -I. -I/root/tmp/pear/mailparse -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/include -I/root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/main -I/root/tmp/pear/mailparse -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/mailparse/php_mailparse_mime.c -o php_mailparse_mime.lo
libtool: compile:  cc -I. -I/root/tmp/pear/mailparse -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/include -I/root/tmp/pear/pear-build-rootvCJJwd/mailparse-3.0.2/main -I/root/tmp/pear/mailparse -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/mailparse/php_mailparse_mime.c  -fPIC -DPIC -o .libs/php_mailparse_mime.o
re2c -b /root/tmp/pear/mailparse/php_mailparse_rfc822.re > /root/tmp/pear/mailparse/php_mailparse_rfc822.c
/bin/sh: re2c: command not found
make: *** [/root/tmp/pear/mailparse/php_mailparse_rfc822.c] Error 127
ERROR: `make' failed

 

mbstring is installed for all php versions.
What do you guys think?

Share this post


Link to post
Share on other sites
  • 0
6 hours ago, Paul said:

I actually got that same error today on a testing server that I was installing mailparse on. You're missing re2c and possibly gcc. As root, run the following command via SSH:

yum install gcc re2c -y

Then, retry

:wub: Marry me. My issue has been resolved. I had to first install mailparse under php7 and then revert back to 5.6 and run it... this issue has been bothering me for a while, so thank you very much.

Share this post


Link to post
Share on other sites
  • 0

if remember correctly it require phpize and it won't work without php7.0-dev,I have some plesk servers and I remember I had to install phpx.x-dev for every version i wanted install mailparse...I had to built it from source but it is same thing in this case script is doing same thing for you

apt-get install php7.0-dev  (for plesk it is apt-get install plesk-php7.0-dev)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×