Moodle

refactoring install.php

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.1
  • Fix Version/s: 2.0
  • Component/s: Unknown
  • Labels:
    None
  • Environment:
    All environment that support PHP
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

This will try to extract the functionality out of install.php file and put it in the libinstall.php. This enables cli installer reuse that code. At the moment refactoring will remove implementation like, configuring the database, configuring the folders, etc. This file will have an effect in install.php since it needed to be changed to accommodate the refactoring.

Activity

Hide
Petr Škoda (skodak) added a comment -

some info for Eloy because he seems more than surprised and too happy with the old installer

I am in a process of:
1/ moving configuration checks from install.php into environment - new section PHP_SETTINGS in environment.xml and setup.php - why?? because many ppl are reporting problems when configuration changes

  • critical PHP settings are now checked on each page see lbi/setuplib.php function setup_validate_php_configuration() - magic_quotes are deadly for security reasons, session auto start breaks sessions completely and magic quotes runtime break everything too
  • less critical and recommended settings were moved into environment.xml - these things need not be installer at all, users should be remonded during each upgrade that something is wrong or not optimal
  • test php version and curl ext and show error only if it fails - this way most ppl will see only environment tests from admin/index.php instead of incomplete two tests in current installer

2/ moving environment test from install.php to admin/index.php - problems here are two - first all strings in environment test need to go into install lang packs, when creating config.php manually the environment tests were not executed at all (critical)

3/ installation strings are getting bigger and bigger - seems easier to download installer right after successful directory selection; this way we can use normal string handling in db selection/configuration/testing etc., this way we will need only some 15 strings instead of 50+ in install/en_utf8/installer.php

4/ enabling full debug and error dispaly in installer + tweaking all strings - this could prevent very many installer bug reports finally

Show
Petr Škoda (skodak) added a comment - some info for Eloy because he seems more than surprised and too happy with the old installer I am in a process of: 1/ moving configuration checks from install.php into environment - new section PHP_SETTINGS in environment.xml and setup.php - why?? because many ppl are reporting problems when configuration changes
  • critical PHP settings are now checked on each page see lbi/setuplib.php function setup_validate_php_configuration() - magic_quotes are deadly for security reasons, session auto start breaks sessions completely and magic quotes runtime break everything too
  • less critical and recommended settings were moved into environment.xml - these things need not be installer at all, users should be remonded during each upgrade that something is wrong or not optimal
  • test php version and curl ext and show error only if it fails - this way most ppl will see only environment tests from admin/index.php instead of incomplete two tests in current installer
2/ moving environment test from install.php to admin/index.php - problems here are two - first all strings in environment test need to go into install lang packs, when creating config.php manually the environment tests were not executed at all (critical) 3/ installation strings are getting bigger and bigger - seems easier to download installer right after successful directory selection; this way we can use normal string handling in db selection/configuration/testing etc., this way we will need only some 15 strings instead of 50+ in install/en_utf8/installer.php 4/ enabling full debug and error dispaly in installer + tweaking all strings - this could prevent very many installer bug reports finally
Hide
Petr Škoda (skodak) added a comment -

the new code should be now fully refactored - going to work on cli installer soon
thanks

Show
Petr Škoda (skodak) added a comment - the new code should be now fully refactored - going to work on cli installer soon thanks

People

Dates

  • Created:
    Updated:
    Resolved: