Posts

Showing posts from May, 2021

PHP version problems

  How to force a specific version of php on linux: Let's say you want to force the linux machine to use php 7.2 specifically Do this: sudo add-apt-repository -y ppa:ondrej/php sudo apt-get install php7.2 php7.2-cli php7.2-common now tell apache: sudo a2dismod php5.6 sudo a2enmod php7.2 sudo service apache2 restart now tell bash: sudo update-alternatives --set php /usr/bin/php7.2 sudo update-alternatives --set phar /usr/bin/phar7.2 sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.2

Controlling moodle from the command line when you can't login

 Sometimes you can't login to moodle because a plugin or other dependency has broken it. Install Moosh. sudo apt-add-repository 'deb http://ppa.launchpad.net/zabuch/ppa/ubuntu trusty main' sudo apt-get update sudo apt-get install moosh The command Moosh understands the following sub-commands: activity-add activity-config-set activity-delete activity-move admin-login admin-remove-orphaned-modules apache-parse-extendedlog apache-parse-missing-files apache-parse-perflog audit-passwords auth-list auth-manage backup-info badge-delete base-path block-add block-manage cache-add-redis-store cache-clear cache-config-get cache-course-rebuild cache-edit-mappings cache-test category-config-set category-create category-delete category-export category-import category-list category-move category-resortcourses chkdatadir code-check cohort-create cohort-enrol cohort-enrolfile cohort-unenrol config-get config-pl