chamilo / chash

Chamilo Shell
GNU General Public License v3.0
15 stars 10 forks source link

1.10.0 install command is broken #39

Open ywarnier opened 9 years ago

ywarnier commented 9 years ago

:/var/www/chamilo110x$ sudo chash chash:chamilo_install --linux-user="www-data" --linux-group="www-data" --sitename="Chamilo" --site_url="http://localhost/" --permissions_for_new_directories="0777" --permissions_for_new_files="0666" --firstname="John" --lastname="Doe" --username="admin" --password="admin" --email="admin@example.com" --language="english" --institution="Chamilo" --institution_url="https://chamilo.org" --driver="pdo_mysql" --port="3306" --host="localhost" --dbname="chamilo110x" --dbuser="chamilo110x" --dbpassword="chamilo110x" --encrypt_method="sha1" --phone="123456" 1.10.0 /var/www/chamilo110x

[sudo] password for ywarnier:

Welcome to the Chamilo installation process.

Configuration file will be saved here: /var/www/chamilo110x/main/inc/conf/configuration.php Portal settings (7) (1/7) Option: sitename = 'Chamilo' was added as an option. (2/7) Option: site_url = 'http://localhost/' was added as an option. (3/7) Option: institution = 'Chamilo' was added as an option. (4/7) Option: institution_url = 'https://chamilo.org' was added as an option. (5/7) Option: encrypt_method = 'sha1' was added as an option. (6/7) Option: permissions_for_new_directories = '0777' was added as an option. (7/7) Option: permissions_for_new_files = '0666' was added as an option. Admin settings: (7) (1/7) Option: firstname = 'John' was added as an option. (2/7) Option: lastname = 'Doe' was added as an option. (3/7) Option: username = 'admin' was added as an option. (4/7) Option: password = 'admin' was added as an option. (5/7) Option: email = 'admin@example.com' was added as an option. (6/7) Option: language = 'english' was added as an option. (7/7) Option: phone = '123456' was added as an option. Database settings: (6) (1/6) Option: driver = 'pdo_mysql' was added as an option. (2/6) Option: host = 'localhost' was added as an option. (3/6) Option: port = '3306' was added as an option. (4/6) Option: dbname = 'chamilo110x' was added as an option. (5/6) Option: dbuser = 'chamilo110x' was added as an option. (6/6) Option: dbpassword = 'chamilo110x' was added as an option. Connection to database chamilo110x established. Connection to database 'chamilo110x' established. Starting the writeConfiguration process. Recovered all info. Reviewing. Data reviewed. Checking where to write to... Looking for main/install/configuration.dist.php. Writing config to /var/www/chamilo110x/main/inc/conf/configuration.php. Config file written. Configuration file saved to /var/www/chamilo110x. Proceeding with updating and cleaning stuff. Starting creation of database version 1.10.0... Creating database chamilo ... No files to load.

jmontoyaa commented 9 years ago

sudo chash chash:chata?

ywarnier commented 9 years ago

I just updated it. It was a copy-paste error (here, not in my command)

ywarnier commented 9 years ago

The "No files to load" error comes from the fact that the Chash\Command\Installation\CommonCommand::getDatabaseMap() method returns this, which doesn't contain any SQL to execute:

            '1.10.0' => array(
                'section' => array(
                    'migrations' => 'Version110',
                    'main' => array(
                        array(
                            'name' => 'chamilo',
                            'sql' => array(
                                //'db_main.sql',
                            ),
                        )
                    )
                )
            ),
jmontoyaa commented 9 years ago

I added some fixes.

Remember the version to be installed is 1.10.x and not 1.10.0 because the tag doesn't exist yet in github.

ywarnier commented 9 years ago

It goes a little further now, but I get this error after launching the command: Table 'chamilo110x.settings_current' doesn't exist' (which is probably related to your last change to data.sql and install.lib.php)

ywarnier commented 9 years ago

There's also (this is a Chamilo issue) the fact that database.sql and data.sql both contain the rows to fill settings_current and settings_options (duplication). Just pointing it here because I realized it now, but it's not directly a Chash issue.