Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65453

Admin CLI install script prompts for values that it doesn't use when the skip-database option is given

XMLWordPrintable

    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MDL-65453-master
    • Hide

      Setup

      You'll need your database info (user, password, database name and etc)
      Please note: The --skip-database option is a bit misleading, it might give you the impression the database details should not be required, but they are as it must fill the config.php with all the database information to be used by install_database.php.
      This options is only to stop the script just before the database install.

      Test --skip-database option.

      1. Clone moodle repository but do not install. (mdk create -n yoursitename)
      2. Go to that moodle root folder.
      3. Run php admin/cli/install.php --skip-database
      4. Make sure you don't get prompted for input for the following fields:
        • Site fullname
        • Site shortname
        • Admin username, email and password.
        • Agree License
      5. Proceed with the install through CLI, if everything works fine you should see the following message in the end:

        Skipping database installation.
        Installation completed successfully.
        

      6. Now, let's proceed with the database install:

        php admin/cli/install_database.php --agree-license --adminpass=test --adminemail="youremail@moodle.com" --fulname=yoursitefullname --shortname=yoursiteshortname
        

      7. Make sure the install finishes without any errors

        Installation completed successfully.
        

      Test normal CLI install

      1. For this test you can either clone a new site or delete config.php and drop the related database.
      2. Go to that moodle root folder.
      3. Run php admin/cli/install.php
      4. The process is the same as above, the difference is that you SHOULD be prompted for the fields:
        • Site fullname
        • Site shortname
        • Admin username, email and password.
        • Agree License
      5. Make sure the full instalation (including db install) finishes as expected.
      Show
      Setup You'll need your database info (user, password, database name and etc) Please note : The --skip-database option is a bit misleading, it might give you the impression the database details should not be required, but they are as it must fill the config.php with all the database information to be used by install_database.php . This options is only to stop the script just before the database install. Test --skip-database option. Clone moodle repository but do not install . (mdk create -n yoursitename) Go to that moodle root folder. Run php admin/cli/install.php --skip-database Make sure you don't get prompted for input for the following fields: Site fullname Site shortname Admin username, email and password. Agree License Proceed with the install through CLI, if everything works fine you should see the following message in the end: Skipping database installation. Installation completed successfully. Now, let's proceed with the database install: php admin/cli/install_database.php --agree-license --adminpass=test --adminemail="youremail@moodle.com" --fulname=yoursitefullname --shortname=yoursiteshortname Make sure the install finishes without any errors Installation completed successfully. Test normal CLI install For this test you can either clone a new site or delete config.php and drop the related database. Go to that moodle root folder. Run php admin/cli/install.php The process is the same as above, the difference is that you SHOULD be prompted for the fields: Site fullname Site shortname Admin username, email and password. Agree License Make sure the full instalation (including db install) finishes as expected.
    • 0
    • International 4.0 - Sprint 2, International 4.0 - Sprint 3

      The admin/cli/install.php script still prompts the user for values such as the site short name, full name, admin email address, admin password even when it's run with the --skip-database flag.

      This is confusing for the user because those values are only set as part of the database install. This means that when --skip-database is set the values aren't actually saved anywhere even though the user provides them.

      Instead the user must set them again when running the admin/cli/install_database.php script or the admin can do it when the log into the site.

      The install script probably shouldn't prompt the user for those values if the --skip-database flag is given.

            lameze Simey Lameze
            ryanwyllie Ryan Wyllie
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 4 hours, 23 minutes
                2d 4h 23m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.