Php mcrypt install yum

How To Install PHP-mCrypt On CentOS 7

Here’s a brief tutorial that shows you how to install mCrypt PHP extension in CentOS 7. For some reasons this PHP extension isn’t available from CentOS 7 default repositories. You may be able to install other PHP extensions right out of the box after installing CentOS, but not PHP-mCrypt.

In other Linux distributions like Ubuntu and openSUSE, one could easily install mCrypt right after installing those operating systems, but not CentOS 7. Few users who read our blogs here was wondering the same thing, so we decided to write a brief tutorial on how to install it in CentOS 7 for those who don’t know.

CentOS 6 and 6.5 allow you to install PHP-mCrypt easily right after installing CentOS. The reason mCrypt is removed by default from version 7 is still unknown, but we’re going to show you how to re-enable it.

Some PHP applications depend on mCrypt. We recently showed you how to install Magento eCommerce application, and one of its requirements is to enable PHP-mCrypt. Without php-mCrypt, Magento won’t function.

If you find yourself needing to install this package, continue below to learn how.

Since the package isn’t readily available from CentOS 7 default repositories, you must enable external repositories that contain the package. One of the many repositories to install in CentOS 7 is the EPEL repository.

This repository contains many valuable and great Linux applications that don’t come installed in CentOS, Fedora or RedHat Linux. To enable the EPEL repository in CentOS 7, run the commands below to download the repository file.

cd /tmp/ && wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-1.noarch.rpm

Next, run the commands below to install the repository you just downloaded.

sudo yum install epel-release-7-1.noarch.rpm

Finally, run the commands below to install PHP-mCrypt.

sudo yum install php-mcrypt*

sudo systemctl restart httpd.service

sudo systemctl restart nginx.service

That’s how you install PHP-mCrypt in CentOS 7. If you have another method, please feel free to show us in your comment section. Our readers will appreciate it.

Источник

Let’s enable PHP mcrypt extension in the server

That was a recent support request that we received in our helpdesk for our Server Management Services.

The PHP-mcrypt extension uses advanced algorithms for cryptography. It helps to encrypt passwords as well as data.

Today, let’s see how our Support Engineers enable PHP mcrypt extension in servers.

What is the mcrypt extension?

Basically, mcrypt is a file encryption tool that uses advanced algorithms like AES, TripleDES and so on.

Читайте также:  Php how to get request headers

The Mcrypt extension is an interface to encrypt the Mcrypt cryptographic library. This extension enables PHP code to use mcrypt.

Earlier this extension was available in PHP. But for PHP 7.2+ and higher, the mcrypt extension is available only in the PECL repository. PHP 7.2 version and above uses libsodium as a cryptography library. Some developers even make use of the PHPSecLib/mcrypt_compat from Github in their code to make things easier.

On the whole, when your application complains about the Mcrypt extension, it is always worth checking the PHP version on the server.

How to install mcrypt extension?

PHP-mcrypt extension can be easily enabled in any server. Our Dedicated Engineers with expertise over a decade enables mcrypt for our customers. Now let’s discuss how we do it.

1. In Linux Servers

Initially, our Support Team verifies if the server has a mcrypt extension.

To check this, we use the command,

If there is no mcrypt extension, we install it. Usually, Linux servers have easy install tools like, yum and apt-get that eases the installation process.

For instance, in a CentOS server we use the command:

And for a Debian/Ubuntu server we use the command:

apt-get install phpxx-mcrypt

Thus we ensure the successful installation of mcrypt extensions in the server.

Finally, we restart the webserver to update the changes.

In servers with PHP version 7.2+, mcrypt is not available with it. So, first we install the mcrypt dependencies using the following command:

apt-get -y install gcc make autoconf libc-dev pkg-config apt-get -y install php7.2-dev apt-get -y install libmcrypt-dev

And to install mcrypt from PECL we use the command:

pecl install --nodeps mcrypt-snapshot

Further, we set the default prefix, edit the PHP configuration and restart service using:

sudo bash -c "echo extension=mcrypt.so > /etc/phpxx/conf.d/mcrypt.ini" sudo service php-fpm restart

That completes the installation of mcrypt on the servers.

Now let’s discuss the same in the Windows server.

2. Windows Server

Usually, in the Windows server, there are two ways to enable PHP-mcrypt extensions. That is manual edits the php.ini file or enable mcrypt via a control panel on the server.

So, if the server has a control panel, we enable the PHP extension from it. We access the configuration area of the panel and enable the mcrypt extension from it.

For instance, the PHP settings in Plesk appear as:

Support Engineers manually edit the php.ini file.

By default, php.ini is the main PHP configuration file. We open it and check for the mcrypt extension. We uncomment the line,

Finally, we save the file and restart the webserver. This shows up Mcrypt on the phpinfo page of the website.

[Having difficulty in enabling PHP-mcrypt extension? – We’ll help you.]

Conclusion

In short, up until the PHP7.2 version, PHP mcrypt extension enables the use of advanced algorithms for cryptography. Today, we saw how our Support Engineers enabled PHP-mcrypt in various server platforms.

Читайте также:  Доклад структура html документа

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

Источник

How to Enable PHP-MCRYPT

In order to successfully connect & use Corrensa plugin – your server should have php-mcrypt enabled. In 90% of the cases – php-mcrypt will already be installed and enabled, however in case where it is not, you will see it pop up in while logging into Corrensa Adapter/Extension in VTiger or in the error window.

We’ve put together instruction on how to enable php-mcrypt for both Unix and Windows servers. These are just very general instructions and it might not work for you, however we strongly recommend that you google “how to enable php-mcrypt on *MY_SERVER*”.

If you run into any issues – feel free to contact us, we’ll be happy to point you the right direction.

Unix Servers

Given that each server configuration is somewhat unique, it’s hard to provide instructions for each server, however – php-mcrypt is a php extension which can be installed using apt-get or yum install (if you are using unix server).

CentOS: yum install php-mcrypt OR yum install php5-mcrypt

Debian/Ubuntu: apt-get install php-mcrypt OR apt-get install php5-mcrypt

Once installed, make sure to restart apache/web server.

/etc/init.d/apache restart OR httpd service restart

That should take care of it.

Windows Servers

For Windows Server/Setup users – you will likely need to go into your WAMP server and enable it from the panel or by editing php.ini.

Plesk Panel/Configuration Area

In some cases WAMP/IIS – you will be able to open configuration area for your apache/web server and enable php-extensions. In that area – you should be able to find php-mcrypt and check/enable it. This would only apply if you ‘Panel/configuration area’ for php extensions.

Manually editing php.ini

This is probably the quickest method to enable php-mcrypt on windows server – all you need to do is:

  • Find php.ini (main php configuration file)
  • Open and search for ;extension=php_mcrypt.dll )
  • Uncomment/remove “;” and save the php.ini

Lastly – make sure to restart apache/web server and the extension should be enabled.

Источник

Установка mCrypt для PHP в Unix/Linux

PHP-mCrypt — это интерфейс к библиотеке Mcrypt, который поддерживает широкий спектр блочных алгоритмов, таких как DES, TripleDES, Blowfish (по умолчанию), 3-Way, защищённый SK64, защищённый SK128, TwoFish, TEA, RC2 и GOST в CBC, OFB, CFB и ECB. Кроме того, он поддерживает RC6 и IDEA, которые считаются «несвободными». В своей теме «Установка mCrypt для PHP в Unix/Linux» я расскажу как можно установить данную библиотеку на примере centOS 6/7 и Debian 8.

Читайте также:  Font awesome content code css

Установка mCrypt для PHP в Unix/Linux

Сейчас, я расскажу как можно установить mCrypt для PHP на примере ОС Debian 8 и CentOS 6.7.

Установка mCrypt для PHP в Debian/Ubuntu

# apt-get install php5-mcrypt

Установка mCrypt для PHP в CentOS/RedHat/Fedora

Если вы используете ОС CentOS/RedHat/Fedora, то установка будет следующей. Для начала, подключаем репозиторий EPEL и выполняем команду для установки PHP-mCrypt:

Откроем файл и добавим в него путь к установленной библиотеке

extension=/usr/lib64/php/modules/mcrypt.so

или если у вас x86 архитектура, то пропишите:

extension=/usr/lib/php/modules/mcrypt.so

Перезапуск веб-сервера.

Если используете Apache на CentOS 7, то команда будет следующей:

# systemctl restart httpd.service

Если используете Nginx на CentOS 7, то команда будет следующей:

# systemctl restart nginx.service

Для остальных версий ОС, используйте:

Для перезапуска апач, используйте:

Для перезапуска энжинкса, используйте:

А на этом, я завершаю свою статью «Установка mCrypt для PHP в Unix/Linux».

Добавить комментарий Отменить ответ

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.

Рубрики

  • Arch Linux (167)
  • Commands (36)
  • Debian’s (635)
    • Administration tools Ubuntu (37)
    • Backups Debian’s (7)
    • Database в Ubuntu (58)
    • Games (игры) (1)
    • Monitoring в Debian и Ubuntu (49)
    • Virtualization в Ubuntu / Debian/ Linux Mint (41)
      • Docker (22)
      • Kubernetes (6)
      • KVM (4)
      • OpenVZ (3)
      • Vagrant (5)
      • VirtualBox (6)
      • ArgoCD (1)
      • Concourse (1)
      • Gitlab (1)
      • Jenkinks (4)
      • Spinnaker (1)
      • Apache (32)
      • Cherokee (1)
      • FTP-services (5)
      • Lighttpd (1)
      • Nginx (26)
      • PHP (27)
      • Proxy для Debian’s (2)
      • Tomcat (4)
      • Панели управления в Ubuntu/Debian/Mint (24)
      • Установка и настройка почты на Ubuntu/Debian (12)
      • Хранилища (clouds) (2)
      • Administration tools freeBSD (19)
      • Database во FreeBSD (52)
      • Monitoring во freeBSD (37)
      • Virtualization во FreeBSD (22)
      • VoIP (1)
      • Установка Web сервисов (91)
      • Установка и настройка почты (6)
      • Установка из ports (пакетов) (19)
      • Установка из sorce code (исходников) (23)
      • Непрерывная интеграция (CI) (27)
      • Database в MacOS (36)
      • Monitoring в Mac OS (31)
      • Security (безопасность) (12)
      • Virtualization в Mac OS (30)
        • Docker (19)
        • Kubernetes (6)
        • Vagrant (5)
        • VirtualBox (5)
        • ArgoCD (1)
        • CircleCI (1)
        • Concourse (1)
        • Gitlab (1)
        • Jenkinks (4)
        • Spinnaker (1)
        • Administration tools CentOS (49)
        • Backups RPM’s (4)
        • Database в CentOS (68)
        • Monitoring в CentOS (67)
        • Virtualization в CentOS/ Red Hat/ Fedora (42)
          • Docker (23)
          • Kubernetes (6)
          • KVM (5)
          • OpenVZ (2)
          • Vagrant (5)
          • VirtualBox (6)
          • VMWare (3)
          • ArgoCD (1)
          • Concourse (1)
          • Gitlab (1)
          • Jenkinks (4)
          • Spinnaker (1)
          • Apache (35)
          • Cherokee (1)
          • DNS (3)
          • FTP (10)
          • Nginx (33)
          • PHP (34)
          • Proxy для RedHat’s (2)
          • Tomcat (2)
          • Voice (2)
          • Панели управления в CentOS/Red Hat/Fedora (27)
          • Прокси сервер на CentOS/RHEL/Fedora (4)
          • Установка и настройка почты на CentOS/RHEL/Fedora (14)
          • Хранилища (clouds) (1)

          соц сети

          Unix-Linux- в примерах

          Unix-Linux- в примерах

          Unix-Linux- в примерах

          Архив новостей

          Свежие записи

          Свежие комментарии

          • Глеб к записи Установка Adobe Flash Player в Debian/Ubuntu/Mint
          • Максим к записи Заблокировать User Agents используя Nginx
          • Денис к записи Как включить EPEL репозиторий на CentOS
          • Гость к записи Закомментировать/Раскомментировать строки vi/vim в Unix/Linux
          • Sergey к записи Установка и настройка OpenVPN сервера на Debian/Ubuntu/Linux Mint

          Источник

Оцените статью