CiviCRM provides, in my opinion, an invaluable configuration check-list.
The first two sections for Site Configuration and Viewing and Editing Contacts are specific to individual installations. Please complete these with your own settings.
The first issue encountered for the Windows IIS installation is related to features not implemented in the PHP 5.2.13 package for Windows.
Please bear in mind that I am not a php developer. In fact, this is the first time I have modified php code with a successful outcome.
It is documented on PHP.net that the feature mcrypt-create-iv is implemented in PHP 5.3.
- CiviCRM Outbound Mail Settings require the php function "mcrypt-create-iv"
- PHP 5.2.13 for Windows does not have this feature implemented. This feature became available in PHP 5.3 for Windows
- CiviCRM is not yet compatible with PHP 5.3.
Will outbound mail work with this error? Doubtful.
Spending quite some time researching first what mcrypt-create-iv provided, second; how is it used in CiviCRM, and finally; is an alternative method available?
Setting the Outbound Mail configuration will lead to a message like the following being displayed on the page:
warning: mcrypt_create_iv() function.mcrypt-create-iv: Cannot open source device in C:\Inetpub\wwwroot\drupal\sites\all\modules\civiCRM\CRM\Utils\Crypt.php on line 69.
warning: mcrypt_generic_init() function.mcrypt-generic-init: Iv size incorrect; supplied length: 0, needed: 32 in C:\Inetpub\wwwroot\drupal\sites\all\modules\civiCRM\CRM\Utils\Crypt.php on line 73.
Eh? My research demonstrated that:
- mcrypt_create_iv() cannot be found
- a required variable with a length of 32 was required to execute mcrypt_generic_init(); it was not provided.
The first thing to be done was to research/find/code an alternative method to replicate the functionality of mcrypt_create_iv(). I discovered an alternative method after hours and research and decided to attempt the change:
- Copy c:\inetpub\wwwroot\drupal\sites\all\modules\civicrm\crm\utils\crypt.php to c:\inetpub\wwwroot\drupal\sites\all\modules\civicrm\crm\utils\crypt.php.bak; creating a backup of the original file
- Open the c:\inetpub\wwwroot\drupal\sites\all\modules\civicrm\crm\utils\crypt.php file in Notepad++ (or another editor)
- Replace the contents of the file with the following:
- Save the file
- Restart the webserver by accessing the windows command prompt and entering the following:
- Browse to http://localhost/drupal/index.php?q=civicrm/admin/setting/smtp&reset=1 and check that the error message has now gone...
Although there is no error message after the changes, and the test email works, I cannot guarantee that this method is correct. However, after the current stage of data migration; when mailings are started, these changes can be confirmed.
If an upgrade to Drupal/CiviCRM is planned, you will need to document the changes to the file and make the necessary changes to any new version.