Archives de la liste a​i​d​e​@p​a​h​e​k​o​.c​l​o​u​d​

erreur essai install 1.1.7

Rodolphe Robles

02/06/2021 20:38:24

Bonjour,

je viens de tester la version 1.1.7 avec une yunohost (qui me pose déjà 
des soucis avec les versions antérieures) et j'ai eu ce message après la 
post-install:

`


  Une erreur s'est produite


  Exception


    no such column: date


      in .../include/lib/KD2/DB/*SQLite3.php*:/519/

|*515*	public function exec(string $statement) *516*	{ *517* 
$this->connect(); *518*	$query = $this->applyTablePrefix($statement); 
_*519*	return $this->db->exec($statement);_ *520*	} *521* *522*	/** 
*523*	* Runs a query and returns the first row from the result |


      in .../include/lib/KD2/DB/*SQLite3.php*:/519/


        → SQLite3->exec /(1 arg.)/

$query 	

string(12954) "CREATE TABLE IF NOT EXISTS config (
     key TEXT PRIMARY KEY NOT NULL,
     value TEXT NULL
);

CREATE TABLE IF NOT EXISTS users_categories
-- Users categories, mainly used to manage rights
(
     id INTEGER PRIMARY KEY NOT NULL,
     name TEXT NOT NULL,

     -- Permissions, 0 = no access, 1 = read-only, 2 = read-write, 9 = admin
     perm_web INTEGER NOT NULL DEFAULT 1,
     perm_documents INTEGER NOT NULL DEFAULT 1,
     perm_users INTEGER NOT NULL DEFAULT 1,
     perm_accounting INTEGER NOT NULL DEFAULT 1,

     perm_subscribe INTEGER NOT NULL DEFAULT 0,
     perm_connect INTEGER NOT NULL DEFAULT 1,
     perm_config INTEGER NOT NULL DEFAULT 0,

     hidden INTEGER NOT NULL DEFAULT 0
);

CREATE INDEX IF NOT EXISTS users_categories_hidden ON users_categories (hidden);

-- Membres de l'asso
-- Table dynamique générée par l'application
-- voir Garradin\Membres\Champs.php

CREATE TABLE IF NOT EXISTS membres_sessions
-- Sessions
(
     selecteur TEXT NOT NULL,
     hash TEXT NOT NULL,
     id_membre INTEGER NOT NULL REFERENCES membres (id) ON DELETE CASCADE,
     expire INT NOT NULL,

     PRIMARY KEY (selecteur, id_membre)
);

CREATE TABLE IF NOT EXISTS services
-- Types de services (cotisations)
(
     id INTEGER PRIMARY KEY NOT NULL,

     label TEXT NOT NULL,
     description TEXT NULL,

     duration INTEGER NULL CHECK (duration IS NULL OR duration > 0), -- En jours
     start_date TEXT NULL CHECK (start_date IS NULL OR date(start_date) = start_date),
     end_date TEXT NULL CHECK (end_date IS NULL OR (date(end_date) = end_date AND
date(end_date) >= date(start_date)))
);

CREATE TABLE IF NOT EXISTS services_fees
(
     id INTEGER PRIMARY KEY NOT NULL,

     label TEXT NOT NULL,
     description TEXT NULL,

     amount INTEGER NULL,
     formula TEXT NULL, -- Formule de calcul du montant de la cotisation, si cotisation
dynamique (exemple : membres.revenu_imposable * 0.01)

     id_service INTEGER NOT NULL REFERENCES services (id) ON DELETE CASCADE,
     id_account INTEGER NU…

|*515*	public function exec(string $statement) *516*	{ *517* 
$this->connect(); *518*	$query = $this->applyTablePrefix($statement); 
_*519*	return $this->db->exec($statement);_ *520*	} *521* *522*	/** 
*523*	* Runs a query and returns the first row from the result |


      in .../include/lib/Garradin/*Install.php*:/91/


        → KD2\DB\SQLite3->exec /(1 arg.)/

$statement 	

string(12954) "CREATE TABLE IF NOT EXISTS config (
     key TEXT PRIMARY KEY NOT NULL,
     value TEXT NULL
);

CREATE TABLE IF NOT EXISTS users_categories
-- Users categories, mainly used to manage rights
(
     id INTEGER PRIMARY KEY NOT NULL,
     name TEXT NOT NULL,

     -- Permissions, 0 = no access, 1 = read-only, 2 = read-write, 9 = admin
     perm_web INTEGER NOT NULL DEFAULT 1,
     perm_documents INTEGER NOT NULL DEFAULT 1,
     perm_users INTEGER NOT NULL DEFAULT 1,
     perm_accounting INTEGER NOT NULL DEFAULT 1,

     perm_subscribe INTEGER NOT NULL DEFAULT 0,
     perm_connect INTEGER NOT NULL DEFAULT 1,
     perm_config INTEGER NOT NULL DEFAULT 0,

     hidden INTEGER NOT NULL DEFAULT 0
);

CREATE INDEX IF NOT EXISTS users_categories_hidden ON users_categories (hidden);

-- Membres de l'asso
-- Table dynamique générée par l'application
-- voir Garradin\Membres\Champs.php

CREATE TABLE IF NOT EXISTS membres_sessions
-- Sessions
(
     selecteur TEXT NOT NULL,
     hash TEXT NOT NULL,
     id_membre INTEGER NOT NULL REFERENCES membres (id) ON DELETE CASCADE,
     expire INT NOT NULL,

     PRIMARY KEY (selecteur, id_membre)
);

CREATE TABLE IF NOT EXISTS services
-- Types de services (cotisations)
(
     id INTEGER PRIMARY KEY NOT NULL,

     label TEXT NOT NULL,
     description TEXT NULL,

     duration INTEGER NULL CHECK (duration IS NULL OR duration > 0), -- En jours
     start_date TEXT NULL CHECK (start_date IS NULL OR date(start_date) = start_date),
     end_date TEXT NULL CHECK (end_date IS NULL OR (date(end_date) = end_date AND
date(end_date) >= date(start_date)))
);

CREATE TABLE IF NOT EXISTS services_fees
(
     id INTEGER PRIMARY KEY NOT NULL,

     label TEXT NOT NULL,
     description TEXT NULL,

     amount INTEGER NULL,
     formula TEXT NULL, -- Formule de calcul du montant de la cotisation, si cotisation
dynamique (exemple : membres.revenu_imposable * 0.01)

     id_service INTEGER NOT NULL REFERENCES services (id) ON DELETE CASCADE,
     id_account INTEGER NU…

|*87*	// Création de la base de données *88*	$db->begin(); *89* 
$db->exec('PRAGMA application_id = ' . DB::APPID . ';'); *90* 
$db->setVersion(garradin_version()); _*91* 
$db->exec(file_get_contents(DB_SCHEMA));_ *92*	$db->commit(); *93* *94* 
file_put_contents(SHARED_CACHE_ROOT . '/version', garradin_version()); *95* |


      in .../include/lib/Garradin/*Install.php*:/74/


        → Garradin\Install::install /(4 arg.)/

$name 	

string(13) "Écranvillage"

$user_name 	

string(23) "Administrateur Garradin"

$user_email 	

string(24) "contact@ecranvillage.net"

$user_password 	

string(32) "frapper nourriture poireau creux"

|*70*	self::assert(strlen($source['user_password']) >= 
Session::MINIMUM_PASSWORD_LENGTH, 'Le mot de passe est trop court'); 
*71*	self::assert($source['user_password'] === 
$source['user_password_confirm'], 'La vérification du mot de passe ne 
correspond pas'); *72* *73*	try { _*74*	return 
self::install($source['name'], $source['user_name'], 
$source['user_email'], $source['user_password']);_ *75*	} *76*	catch 
(\Exception $e) { *77*	@unlink(DB_FILE); *78*	throw $e; |


      in .../www/admin/*install.php*:/36/


        → Garradin\Install::installFromForm /(0 arg.)/

|*32*$form = new Form; *33*$tpl->assign_by_ref('form', $form); *34* 
*35*$form->runIf('save', function () { _*36* 
Install::installFromForm();_ *37* Session::getInstance()->forceLogin(1); 
*38*}, 'install', ADMIN_URL); *39*
*40*$tpl->display('admin/install.tpl'); |


        → Garradin\{closure} /(0 arg.)/


      in .../include/lib/Garradin/*Form.php*:/39/


        → call_user_func /(1 arg.)/

$function_name 	

object(Closure) (1) {
}

|*35*	return false; *36*	} *37* *38*	try { _*39*	call_user_func($fn);_ 
*40* *41*	if (null !== $redirect) { *42*	if (array_key_exists('_dialog', 
$_GET)) { *43*	Utils::reloadParentFrame(); |


      in .../include/lib/Garradin/*Form.php*:/66/


        → Garradin\Form->run /(3 arg.)/

$fn 	

object(Closure) (1) {
}

$csrf_key 	

string(7) "install"

$redirect 	

string(34) "https://rodinux.fr/garradin/admin/"

|*62*	elseif (is_bool($condition) && !$condition) { *63*	return null; 
*64*	} *65* _*66*	return $this->run($fn, $csrf_key, $redirect);_ *67*	} 
*68* *69*	public function check($token_action = '', Array $rules = null) 
*70*	{ |


      in .../www/admin/*install.php*:/38/


        → Garradin\Form->runIf /(4 arg.)/

$condition 	

string(4) "save"

$fn 	

object(Closure) (1) {
}

$csrf_key 	

string(7) "install"

$redirect 	

string(34) "https://rodinux.fr/garradin/admin/"

|*34* *35*$form->runIf('save', function () { *36* 
Install::installFromForm(); *37* Session::getInstance()->forceLogin(1); 
_*38*}, 'install', ADMIN_URL);_ *39* 
*40*$tpl->display('admin/install.tpl'); *41* |


    Context

id 	5ug392nm
date 	2021-06-02T20:33:16+02:00
os 	Linux
language 	PHP 7.4.18
environment 	development
php_sapi 	fpm-fcgi
remote_ip 	2a01:e0a:282:a850:e4fd:aec:abc5:5c7f
http_method 	POST
files_sent 	array(0) { }
rootDirectory 	/var/www/garradin
garradin_data_root 	/var/www/garradin/data
garradin_version 	1.1.7
url 	https://rodinux.fr/garradin/admin/install.php


`

erreur essai install 1.1.7

BohwaZ/Garradin

02/06/2021 21:29:12

Merci, corrigé :)