2

What issues are there installing, running, and upgrading CiviCRM when using Microsoft IIS as the webserver in 2022?

1 Answer 1

1

For general windows-based installs @demeritcowboy would say it mostly works just there's one or two things if you do custom code with CRM_Core_BAO_File and friends where you have to fight with / and \. Buildkit does not work, although he did get it working with WSL at one point. There used to be an issue with some places showing monetary amounts with extra zeros, e.g. $20.00000000 but he doesn't recall seeing it recently (this is separate from the backend spots where this is on-purpose to allow very precise tax calculations or bitcoin to work out).

@Stephen Palmstrom says "We are running CiviCRM under Drupal 9 under IIS - it was quicker for me to set that up than climbing the LAMP learning curve. On the whole it works well. I use Git Bash to run Composer to do installs as PowerShell doesn't always work so well. I also had to remove bin from hidden segments for API Explorer 4 to work. I also run attrib -r /s /d after an update. I use MySQL Workbench to manage MySQL. We aren't using Buildkit, but install using Composer. Below is a shell script I use in my IIS development environment that you may want to tweak for your purposes - it comes 'as is' with no warranty. It takes the folder, the application, the version and whether to run update immediately. That is because sometimes you are updating both Drupal and CiviCRM at the same time and it is quicker to run Composer Update only once. We have a very light workload so I can't vouch for performance if you have large number of users.

#!/bin/bash
#
#   Script to run Composer to update Drupal and/or CiviCRM
#
#   Stephen Palmstrom 18 March 2021
#
echo Updating...
while getopts r:a:v:u: option
do
case "${option}"
in
r ) ROOT=${OPTARG};;
a ) APPLICATION=${OPTARG};;
v ) VERSION=${OPTARG};;
u ) UPDATE=${OPTARG};;
esac
done
if [ "$ROOT" == "" ]
  then
    echo You need to specify a root folder!
    exit 0
fi
set -x
cd "$ROOT"
case $APPLICATION in
    "CiviCRM") PARAMS="civicrm/civicrm-core:$VERSION civicrm/civicrm-drupal-8:$VERSION civicrm/civicrm-packages:$VERSION";;
    "Drupal") PARAMS="drupal/core:$VERSION drupal/core-composer-scaffold:$VERSION drupal/core-recommended:$VERSION";;
    *) echo "-a CiviCRM or -a Drupal"
    exit 0;;
esac
EXTRAPARAMS=" --update-with-all-dependencies --no-update"
composer self-update
composer require $PARAMS $EXTRAPARAMS
if  [ "$UPDATE" == "YES" ]
    then
    echo "Running update..."
    # Make sure folders are writable as rmdir sometimes times out.
    #chmod 775 * -R
    composer update
    # Make sure these folders are writable after the update.
    chmod 775 $ROOT\\web\\sites\\default\\files\\civicrm -R
    set +x
fi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.