Travis: debug installation

pull/3064/head
Julio 5 years ago
parent b5075feb3c
commit a523d8c25f
  1. 1
      .travis.yml
  2. 10
      public/main/install/index.php
  3. 1
      public/main/install/install.lib.php
  4. 3
      tests/behat/features/actionInstall.feature
  5. 4
      tests/travis/travis-apache

@ -80,7 +80,6 @@ install:
script:
- composer analyse
- curl $VHOST_URL/check.php
- cd tests/behat
# - travis_wait 45 ../../vendor/behat/behat/bin/behat -v
- ../../vendor/behat/behat/bin/behat features/actionInstall.feature

@ -269,6 +269,8 @@ if (!$_POST) {
$current_step = 7;
}
error_log("Step: $current_step");
// Managing the $encryptPassForm
if ($encryptPassForm == '1') {
$encryptPassForm = 'bcrypt';
@ -582,6 +584,8 @@ if (isset($_POST['step2'])) {
error_log('Set upgradeWithContainer');
} else {
set_file_folder_permissions();
error_log("connectToDatabase as user $dbUsernameForm");
$database = connectToDatabase(
$dbHostForm,
$dbUsernameForm,
@ -593,8 +597,12 @@ if (isset($_POST['step2'])) {
$dbNameForm = preg_replace('/[^a-zA-Z0-9_\-]/', '', $dbNameForm);
// Drop and create the database anyways
error_log("Drop database $dbNameForm");
$manager->getConnection()->getSchemaManager()->dropAndCreateDatabase($dbNameForm);
error_log("Connect to database $dbNameForm with user $dbUsernameForm");
$database = connectToDatabase(
$dbHostForm,
$dbUsernameForm,
@ -622,11 +630,13 @@ if (isset($_POST['step2'])) {
updateEnvFile($distFile, $envFile, $params);
(new Dotenv())->load($envFile);
error_log("Boot kernel");
// Load Symfony Kernel
$kernel = new Kernel('dev', true);
$application = new Application($kernel);
// Create database
error_log("Create database");
$input = new ArrayInput([]);
$command = $application->find('doctrine:schema:create');
$result = $command->run($input, new ConsoleOutput());

@ -2840,6 +2840,7 @@ function updateEnvFile($distFile, $envFile, $params)
$contents = file_get_contents($distFile);
$contents = str_replace(array_keys($params), array_values($params), $contents);
file_put_contents($envFile, $contents);
error_log("File env saved here: $envFile");
}
/**

@ -23,7 +23,8 @@ Feature: Install portal
| passForm | admin |
Then I press "step5"
Then I should see "Last check before install"
Then I press "Install chamilo"
Then wait the page to be loaded when ready
Then I press "button_step6"
Then wait the page to be loaded when ready
Then I should see "Step7"

@ -8,10 +8,6 @@
Require all granted
</Directory>
#ErrorLog ${APACHE_LOG_DIR}/%VHOST_URL%-error.log
LogLevel notice
#CustomLog ${APACHE_LOG_DIR}/%VHOST_URL%-access.log combined
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi

Loading…
Cancel
Save