Jump to content
  • 0

Centos 7 - Configure PHP 7 to recognise gmp, imap, mailparse & mcrypt


EMar

Question

Hi,

 

I'm attempting a different setup this time, Centos 7 with Webmin/Virtualmin.

The default php version for Webmin/Virtualmin is 5.4.16, although it also includes php 7.0.
I set my main domain / virtual host php 7.0, I have extensions gmp, imap, mailparse and mcrypt installed. 

I had to add the line below to a different location so php7 would recognize Ioncube and Blesta to run:
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.0.so

The above line was added here: /home/site1/etc/php7.0/php.ini

And then
service httpd restart
service php-fpm restart

Then Blesta installer would run, 
I think I'm having similar issues with gmp, imap, mailparse & mcrypt,
Blesta still says these extensions need to be installed, so this has me thinking,
Do I need to configure something in my php 7 setup to recognize these extensions?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
40 minutes ago, EMar said:

Hi,

 

I'm attempting a different setup this time, Centos 7 with Webmin/Virtualmin.

The default php version for Webmin/Virtualmin is 5.4.16, although it also includes php 7.0.
I set my main domain / virtual host php 7.0, I have extensions gmp, imap, mailparse and mcrypt installed. 

I had to add the line below to a different location so php7 would recognize Ioncube and Blesta to run:
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.0.so

The above line was added here: /home/site1/etc/php7.0/php.ini

And then
service httpd restart
service php-fpm restart

Then Blesta installer would run, 
I think I'm having similar issues with gmp, imap, mailparse & mcrypt,
Blesta still says these extensions need to be installed, so this has me thinking,
Do I need to configure something in my php 7 setup to recognize these extensions?

On CentOS 7 / Virtualmin, PHP 7 can be installed from different repositories. You just need to install the packages.

Run this: rpm -qa | grep php

Do your php 7 packages start with rh-php70-php? If so, then you'd run:

yum install rh-php70-php-gmp

I don't see packages specifically for imap or mcrypt, so they might be part of something else.. you can run: yum search php70 to get a full list of matching php7 packages you could install.

For mailparse you may be able to install with: pecl install mailparse

.. and you may need to add to php.ini for mailparse.

Link to comment
Share on other sites

  • 0

[root@me ~]# yum search php70
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.grid.uchicago.edu
 * epel: mirror.steadfast.net
 * extras: centos.mbni.med.umich.edu
 * updates: mirror.sesp.northwestern.edu
============================== N/S matched: php70 ==============================
rh-php70-runtime.x86_64 : Package that handles rh-php70 Software Collection.
rh-php70-scldevel.x86_64 : Package shipping development files for rh-php70
sclo-php70-php-pecl-propro-devel.x86_64 : sclo-php70-php-pecl-propro developer
                                        : files (header)
sclo-php70-php-pecl-raphf-devel.x86_64 : sclo-php70-php-pecl-raphf developer
                                       : files (header)
rh-php70.x86_64 : Package that installs PHP 7.0
rh-php70-build.x86_64 : Package shipping basic build configuration
rh-php70-php.x86_64 : PHP scripting language for creating dynamic web sites
rh-php70-php-bcmath.x86_64 : A module for PHP applications for using the bcmath
                           : library
rh-php70-php-cli.x86_64 : Command-line interface for PHP
rh-php70-php-common.x86_64 : Common files for PHP
rh-php70-php-dba.x86_64 : A database abstraction layer module for PHP
                        : applications
rh-php70-php-dbg.x86_64 : The interactive PHP debugger
rh-php70-php-devel.x86_64 : Files needed for building PHP extensions
rh-php70-php-embedded.x86_64 : PHP library for embedding in applications
rh-php70-php-enchant.x86_64 : Enchant spelling extension for PHP applications
rh-php70-php-fpm.x86_64 : PHP FastCGI Process Manager
rh-php70-php-gd.x86_64 : A module for PHP applications for using the gd graphics
                       : library
rh-php70-php-gmp.x86_64 : A module for PHP applications for using the GNU MP
                        : library
rh-php70-php-intl.x86_64 : Internationalization extension for PHP applications
rh-php70-php-json.x86_64 : JavaScript Object Notation extension for PHP
rh-php70-php-ldap.x86_64 : A module for PHP applications that use LDAP
rh-php70-php-mbstring.x86_64 : A module for PHP applications which need
                             : multi-byte string handling
rh-php70-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL
                            : databases
rh-php70-php-odbc.x86_64 : A module for PHP applications that use ODBC databases
rh-php70-php-opcache.x86_64 : The Zend OPcache
rh-php70-php-pdo.x86_64 : A database access abstraction module for PHP
                        : applications
rh-php70-php-pear.noarch : PHP Extension and Application Repository framework
rh-php70-php-pgsql.x86_64 : A PostgreSQL database module for PHP
rh-php70-php-process.x86_64 : Modules for PHP script using system process
                            : interfaces
rh-php70-php-pspell.x86_64 : A module for PHP applications for using pspell
                           : interfaces
rh-php70-php-recode.x86_64 : A module for PHP applications for using the recode
                           : library
rh-php70-php-snmp.x86_64 : A module for PHP applications that query SNMP-managed
                         : devices
rh-php70-php-soap.x86_64 : A module for PHP applications that use the SOAP
                         : protocol
rh-php70-php-xml.x86_64 : A module for PHP applications which use XML
rh-php70-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC
                           : protocol
rh-php70-php-zip.x86_64 : ZIP archive management extension for PHP
sclo-php70-php-imap.x86_64 : A module for PHP applications that use IMAP
sclo-php70-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library
                             : support
sclo-php70-php-pecl-amqp.x86_64 : Communicate with any AMQP compliant server
sclo-php70-php-pecl-apcu.x86_64 : APC User Cache
sclo-php70-php-pecl-apcu-bc.x86_64 : APCu Backwards Compatibility Module
sclo-php70-php-pecl-apcu-devel.x86_64 : APCu developer files (header)
sclo-php70-php-pecl-apfd.x86_64 : Always Populate Form Data
sclo-php70-php-pecl-geoip.x86_64 : Extension to map IP addresses to geographic
                                 : places
sclo-php70-php-pecl-http.x86_64 : Extended HTTP support
sclo-php70-php-pecl-http-devel.x86_64 : Extended HTTP support developer files
                                      : (header)
sclo-php70-php-pecl-igbinary.x86_64 : Replacement for the standard PHP
                                    : serializer
sclo-php70-php-pecl-igbinary-devel.x86_64 : Igbinary developer files (header)
sclo-php70-php-pecl-imagick.x86_64 : Extension to create and modify images using
                                   : ImageMagick
sclo-php70-php-pecl-imagick-devel.x86_64 : imagick extension developer files
                                         : (header)
sclo-php70-php-pecl-lzf.x86_64 : Extension to handle LZF de/compression
sclo-php70-php-pecl-memcached.x86_64 : Extension to work with the Memcached
                                     : caching daemon
sclo-php70-php-pecl-mongodb.x86_64 : MongoDB driver for PHP
sclo-php70-php-pecl-msgpack.x86_64 : API for communicating with MessagePack
                                   : serialization
sclo-php70-php-pecl-msgpack-devel.x86_64 : MessagePack developer files (header)
sclo-php70-php-pecl-propro.x86_64 : Property proxy
sclo-php70-php-pecl-raphf.x86_64 : Resource and persistent handles factory
sclo-php70-php-pecl-redis.x86_64 : Extension for communicating with the Redis
                                 : key-value store
sclo-php70-php-pecl-selinux.x86_64 : SELinux binding for PHP scripting language
sclo-php70-php-pecl-solr2.x86_64 : Object oriented API to Apache Solr
sclo-php70-php-pecl-ssh2.x86_64 : Bindings for the libssh2 library
sclo-php70-php-pecl-uploadprogress.x86_64 : An extension to track progress of a
                                          : file upload
sclo-php70-php-pecl-uuid.x86_64 : Universally Unique Identifier extension for
                                : PHP
sclo-php70-php-pecl-xattr.x86_64 : Extended attributes
sclo-php70-php-pecl-xdebug.x86_64 : PECL package for debugging PHP scripts
sclo-php70-php-smbclient.x86_64 : PHP wrapper for libsmbclient
sclo-php70-php-tidy.x86_64 : Standard PHP module provides tidy library support

  Name and summary matches only, use "search all" for everything.
[root@me ~]#
 

Link to comment
Share on other sites

  • 0

Cool thanks I got gmp now, 
I also did yum install sclo-php70-php-imap.x86_64

But that's not recognized.


Installed:
  rh-php70-php-gmp.x86_64 0:7.0.10-2.el7

Complete!
[root@me ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
[root@me ~]# yum install sclo-php70-php-imap.x86_64
Loaded plugins: fastestmirror
[root@me ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
[root@me ~]# pecl install mailparse
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
pecl/mailparse requires PHP (version >= 7.0.0), installed version is 5.4.16
No valid packages found
install failed
[root@me ~]#

 

Link to comment
Share on other sites

  • 0
3 minutes ago, EMar said:

Cool thanks I got gmp now, 
I also did yum install sclo-php70-php-imap.x86_64 ?

But that's not recognized.

There are 2 different packages for PHP 7.0 available to you.. rh- and sclo-. It sounds like you are running rh-php70 so you should not install packages from sclo-. You may be able to install sclo-php70 packages alongside rh-php70, and select it under PHP Versions in Virtualmin but I have not tried this myself and I don't know if it will create any conflicts.

Link to comment
Share on other sites

  • 0

Yes the rh commands work for me, I got gmp working but nothing for imap, mailparse & mcrypt.
I think the problem is the default php version is 5.4.16 and the virtual host is using php 7.0.

I dunno, if I could remove php 5.4 from webmin and just use php 7.0. 

Link to comment
Share on other sites

  • 0

Will any of these work? or is that a list of what's running?

[root@me ~]# rpm -qa | grep php
rh-php70-php-json-7.0.10-2.el7.x86_64
rh-php70-php-pdo-7.0.10-2.el7.x86_64
rh-php70-php-devel-7.0.10-2.el7.x86_64
rh-php70-php-pspell-7.0.10-2.el7.x86_64
rh-php70-php-fpm-7.0.10-2.el7.x86_64
php-cli-5.4.16-43.el7_4.x86_64
php-pear-1.9.4-21.el7.noarch
php-imap-5.4.16-7.el7.x86_64
rh-php70-php-zip-7.0.10-2.el7.x86_64
rh-php70-php-common-7.0.10-2.el7.x86_64
rh-php70-php-xml-7.0.10-2.el7.x86_64
rh-php70-php-process-7.0.10-2.el7.x86_64
rh-php70-php-gd-7.0.10-2.el7.x86_64
rh-php70-2.3-1.el7.x86_64
rh-php70-php-xmlrpc-7.0.10-2.el7.x86_64
rh-php70-php-opcache-7.0.10-2.el7.x86_64
rh-php70-php-mbstring-7.0.10-2.el7.x86_64
php-common-5.4.16-43.el7_4.x86_64
php-pdo-5.4.16-43.el7_4.x86_64
php-xml-5.4.16-43.el7_4.x86_64
wbm-php-pear-1.6-1.noarch
php-mcrypt-5.4.16-7.el7.x86_64
rh-php70-php-7.0.10-2.el7.x86_64
php-gd-5.4.16-43.el7_4.x86_64
php-mysql-5.4.16-43.el7_4.x86_64
php-xmlrpc-5.4.16-43.el7_4.x86_64
php-fpm-5.4.16-43.el7_4.x86_64
rh-php70-runtime-2.3-1.el7.x86_64
rh-php70-php-cli-7.0.10-2.el7.x86_64
rh-php70-php-pear-1.10.1-3.el7.noarch
rh-php70-php-gmp-7.0.10-2.el7.x86_64
rh-php70-php-mysqlnd-7.0.10-2.el7.x86_64
rh-php70-php-bcmath-7.0.10-2.el7.x86_64
php-process-5.4.16-43.el7_4.x86_64
php-5.4.16-43.el7_4.x86_64
php-mbstring-5.4.16-43.el7_4.x86_64
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...