{"id":6030,"date":"2021-01-02T11:42:18","date_gmt":"2021-01-02T06:12:18","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=6030"},"modified":"2021-03-21T18:39:58","modified_gmt":"2021-03-21T13:09:58","slug":"install-php-7-2-mcrypt-module-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/install-php-7-2-mcrypt-module-on-ubuntu-18-04\/","title":{"rendered":"Install PHP 7.2-mcrypt Module on Ubuntu 18.04"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Install PHP 7.2-mcrypt Module on Ubuntu 18.04<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Date: 01-01-2021<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Introduction:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The PHP mcrypt module has been deprecated in PHP 7.2 so it&#8217;s not available by default. PHP 7.2-mcrypt package is missing in Ubuntu server. You need to follow the below steps to install this module for PHP 7.2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:<\/strong> Run the below command to install PHP 7.2.<br><code># apt install php-7.2<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: <\/strong>Run the below command to install the required packages on Ubuntu.<br><code># apt install php-dev php-pear libmcrypt-dev<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3:<\/strong> Run the below commands to install PHP mcrypt module on Ubuntu by using pecl channel.<br><code># pecl channel-update pecl.php.net<\/code><br><code># pecl install mcrypt-1.0.1<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4:<\/strong>  You should get below message after running the above commands. It&#8217;s showing mcrypt has installed successfully.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"253\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-01-at-7.59.32-PM-1024x253.png\" alt=\"\" class=\"wp-image-6035\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-01-at-7.59.32-PM-1024x253.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-01-at-7.59.32-PM-300x74.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-01-at-7.59.32-PM-768x190.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-01-at-7.59.32-PM-850x210.png 850w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-01-at-7.59.32-PM-1200x298.png 1200w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-01-at-7.59.32-PM.png 1206w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 5:<\/strong> You need to add the below line into the php.ini file for the web server.<br><code>extension=mcrypt.so<\/code><br>If you are using Apache2 web server, use below command.<br><code># nano \/etc\/php\/7.2\/apache2\/php.ini<\/code><br>If you are using Nginx web server, use below command. <br><code># nano \/etc\/php\/7.2\/fpm\/php.ini<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 6: <\/strong>Finally, Restart the web server by using below commands.<br>For Apache2:<br><code># systemctl restart apache2<\/code><br>For Nginx:<br><code># systemctl restart nginx<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install PHP 7.2-mcrypt Module on Ubuntu 18.04 Date: 01-01-2021 Introduction: The PHP mcrypt module has been deprecated in PHP 7.2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[799,682],"class_list":["post-6030","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-php-7-2","tag-php-installation","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1zg","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=6030"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6030\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}