Answers.Body: <p>The old warning was actually just dealt with yesterday (<a href="https://github.com/civicrm/civicrm-core/pull/13770" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/13770</a>).</p>
  
  <p>If you can remove mcrypt, you can get smtp working again by going to the admin screens in civicrm to reenter and resave your password. My understanding is it will be stored unencrypted in the database, but at least will work.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-07T19:50:44.217Z
Answers.Text: Thanks for the reply Demerit, unfortunately removing mcrypt didn't work. Glad to hear that warning has been removed. Hopefully more useable advice will be offered around the move to PHP 7.2. I'm still looking for a way to remove all PHPs and start over.
Answers.UserDisplayName: Stephen Sloan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-07T17:47:45.557Z
Answers.LastActivityDate: 2019-03-07T17:47:45.557Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>OK, so I restored my server from a backup (hurrah for backups) before I did the upgrades and the problem persists so it is NOT due to mcrypt or anything to do with PHP 7.2.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-09T18:46:48.123Z
Answers.Text: Turned out to be a problem with IPv6 which was not enabled on my server but CiviCRM was trying to use.
Answers.UserDisplayName: Stephen Sloan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-08T19:28:49.580Z
Answers.LastActivityDate: 2019-03-08T19:28:49.580Z
Answers.UserDisplayName: Stephen Sloan
Body: <p>Recently I updated CiviCRM to version 5.10.4 and while I was at it updated Drupal to 7.64 (using drush). Everything appeared fine. Then I noticed in the CiviCRM System Status report that PHP 7.1 which I had been using was no longer recommended and that I should upgrade PHP to 7.2. When I did that, the CiviCRM System Status reported "PHP Missing Extension 'mcrypt'". Not knowing that mcrypt could reek havoc on my server, I dutifully went to add it. Long story shortened, right now I'm feeling very confused and SMTP isn't working either in Drupal (not a big deal since I only use Drupal as a platform for CiviCRM) or in CiviCRM (a very big deal). Just to be clear, everything was working fine before I did the upgrades.</p>
  
  <p>My inclination is to nuke PHP and reinstall it. I'm seeking advice as to whether this could work, or is there an easier way to solve my problem. I'm running Ubuntu Server 18.04. If I tried something like:</p>
  
  <p>apt purge ^php*</p>
  
  <p>Would that completely remove PHP from my system? A bit of background that may be relevant, when I first set up the server (apache2) I had installed three versions of PHP, 7.1, 7.2, and 7.3. I'm pretty sure that somewhere I've missed some configuration files and that some of my problems come from version issues. When I went to do a PECL install of mcrypt it successfully created the module but PHP complained that it was compiled against a different API.</p>
  
Tags: <php>
Title: Broken SMTP after switching to PHP 7.2
ThreadText: # Broken SMTP after switching to PHP 7.2
  
  (Asked by: username_0 on 2019-03-07)
  
  Recently I updated CiviCRM to version 5.10.4 and while I was at it updated Drupal to 7.64 (using drush). Everything appeared fine. Then I noticed in the CiviCRM System Status report that PHP 7.1 which I had been using was no longer recommended and that I should upgrade PHP to 7.2. When I did that, the CiviCRM System Status reported "PHP Missing Extension 'mcrypt'". Not knowing that mcrypt could reek havoc on my server, I dutifully went to add it. Long story shortened, right now I'm feeling very confused and SMTP isn't working either in Drupal (not a big deal since I only use Drupal as a platform for CiviCRM) or in CiviCRM (a very big deal). Just to be clear, everything was working fine before I did the upgrades.
  
  My inclination is to nuke PHP and reinstall it. I'm seeking advice as to whether this could work, or is there an easier way to solve my problem. I'm running Ubuntu Server 18.04. If I tried something like:
  
  apt purge ^php\*
  
  Would that completely remove PHP from my system? A bit of background that may be relevant, when I first set up the server (apache2) I had installed three versions of PHP, 7.1, 7.2, and 7.3. I'm pretty sure that somewhere I've missed some configuration files and that some of my problems come from version issues. When I went to do a PECL install of mcrypt it successfully created the module but PHP complained that it was compiled against a different API.
  
  **Tags:** php
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-03-07. Score: 3
  
  The old warning was actually just dealt with yesterday (<https://github.com/civicrm/civicrm-core/pull/13770>).
  
  If you can remove mcrypt, you can get smtp working again by going to the admin screens in civicrm to reenter and resave your password. My understanding is it will be stored unencrypted in the database, but at least will work.
  
  > **Comments:**
  > **username_0**: Thanks for the reply username_1, unfortunately removing mcrypt didn't work. Glad to hear that warning has been removed. Hopefully more useable advice will be offered around the move to PHP 7.2. I'm still looking for a way to remove all PHPs and start over.  
  
  ---
  
  ### Answer by username_0 on 2019-03-08. Score: 1
  
  OK, so I restored my server from a backup (hurrah for backups) before I did the upgrades and the problem persists so it is NOT due to mcrypt or anything to do with PHP 7.2.
  
  > **Comments:**
  > **username_0**: Turned out to be a problem with IPv6 which was not enabled on my server but CiviCRM was trying to use.  
  
  ---
  
  