'; ob_flush(); flush(); require_once 'phar://'.$composer.'/src/bootstrap.php'; ob_flush(); flush(); $composer_home = getenv('COMPOSER_HOME'); $personal_home = getenv('HOME'); if (empty($composer_home) === true && empty($personal_home) === true) { putenv('COMPOSER_HOME='.sys_get_temp_dir()); } $application = new \Composer\Console\Application(); $application->setAutoExit(false); $command = $application->find('install'); $input = new \Symfony\Component\Console\Input\ArrayInput(array( 'command' => 'install', '-d' => __DIR__, '-vvv', '--optimize-autoloader', )); $fhandle = fopen('php://output', 'wb'); $output = new \Symfony\Component\Console\Output\StreamOutput($fhandle); $application->run($input, $output); fclose($fhandle); ob_flush(); flush(); // Save configuration $configuration = file_get_contents($configuration_file.'.template'); if (false === $configuration) { throw new \Exception('Impossible to read template configuration'); } $configuration = str_replace( array( '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', '\'\'', ), array( var_export($_POST['title'], true), var_export($_POST['email'], true), var_export($_POST['no-reply-email'], true), var_export($_POST['db-name'], true), var_export($_POST['db-user'], true), var_export($_POST['db-pass'], true), var_export($_POST['db-host'], true), var_export($_POST['db-type'], true), ), $configuration ); if (file_put_contents($configuration_file, $configuration) === false) { throw new \Exception('Impossible to save configuration'); } // Inject database require_once __DIR__.'/app/inc/init.php'; $sqls = explode("\n", file_get_contents(__DIR__.'/install.mysql.auto.sql')); foreach ($sqls as $sql) { $sql = trim($sql); if (empty($sql) === true) { continue; } $query = $connect->Prepare($sql); $cleaning = $connect->Execute($query); } ob_flush(); flush(); ob_end_clean(); } catch (Exception $e) { echo '
'.$e->getMessage().'
'; echo "
".$e->getTraceAsString()."
"; die('installation failed'); } } ?> OpenSondage Installation

OpenSondage Installation

General
Database