Configuration files (translate in progress)

When you create a new project, the builder creates 3 configuration files connexion.ini.php, site.ini.php and routing.php

We explain in this page every variable

File connexion.ini.php

It contains every connection profil

Section [db]

Introduction


  
[db]
myProfilName.dsn="dsnConnectionString"
myProfilName.sgbd=sgbdDriverType
myProfilName
.hostname=server
myProfilName
.database=database
myProfilName
.username=unserName
myProfilName
.password=Password
   


Variable myProfilName.dsn

When you use a pdo sbgbd type: pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_mssql,pdo_oracle, you need to fill a dns connection string
More information about: http://php.net/manual/fr/pdo.construct.php

Variable myProfilName.sgbd

Sgbd driver type to use, it is the name of the class to user:
For pdo: pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_mssql,pdo_oracle
For no pdo: mysql,csv,xml

Variable myProfilName.database

Database name (only needed for drivers no pdo)

Variable myProfilName.hostname

Database server name (only needed for drivers no pdo)

Variable myProfilName.username

Username of the connection

Variable myProfilName.password

Password of the connection

File site.ini.php

Contains majority of your website configuration

Section [cache]

introduction


  
[cache]
enabled=0
lifetime
= (0*3600)
autoload.enabled=0
   


Variable enabled

You can enable/disable the cache for all your website

Variable lifetime

Defined validity lifetime of your cache pages (in seconds)

Variable autoload.enabled

Enable/disable generation of the autoloader cache (to gain perfomance when you deliver in production environment)
If disable, when you call a new class, the autoloader read the class name, analyze it and find the directory where is the class file.
If enable, framework make an associative array that contains all class with their filename adress.

Section [encodage]

Introduction

Configure then charset used by the framework, for information, variables $_GET,$_POST are converted in HTML with this parameter

  
[encodage]
;default 
charsetused by plugin_html::encode($text)
charset=ISO-8859-1
   


Variable charset

Charset used

Section [language]

Introduction


  
[language]
;
fr en... //sLangue
default=fr
allow
=fr,en
   


Variable default

Default language (when you use i18n plugin)

Section [auth]

Introduction


  
[auth]
;
note : >= php5.2 dans le php.ini
session
.use_cookies 1
session
.use_only_cookies 1
session
.cookie_httponly=1
session
.cookie_secure=0
session
.cookie_domain=
session.cookie_path=
session.cookie_lifetime=
enabled=0
class=plugin_auth
module
=auth::login
session
.timeout.enabled=1
session
.timeout.lifetime=(60*1)
    


Variable session.use_cookies

Enable the use of session cookies despite a GET parameter in URL

Variable session.cookie_httponly

Used when the framework create the cookie: indicate if the cookie is readable only on the server side with php and not on the client side with javascript (for security enable it)

Variable session.cookie_secure

Indicate if the cookie is only available with a https connection (enable it if your website use https)

Variable session.cookie_domain

The domain contraint, more information there: http://php.net/manual/fr/function.session-set-cookie-params.php

Variable session.cookie_path

Path contraint, more information there: http://php.net/manual/fr/function.session-set-cookie-params.php

Variable session.use_only_cookies

If enable, use only session cookie to manage session

Variable enabled

Enable/disable the private access for your website

Variable class

Plugin to use for private access

Variable module

Module to use for autenticate: if the user is not log in, he will be redirect to this couple module/action

Variable session.timeout.enabled

Enable/disable the use of a lifetime for your session

Variable session.timeout.lifetime

Lifetime between two clis on your website (in seconds)

Section [acl]

Introduction


  
[acl]
class=
plugin_gestionuser
   


Variable class

Plugin class used to managed permissions, call by _root::getACL()
More information about there http://mkdevs.com/tutoriaux_en.html#acl

Section [navigation]

Introduction


  
[navigation]
scriptname=index.php
var=:nav
module
.default=pages
action
.default=accueil
layout
.erreur=site/layout/erreurprod.php
   


Variable scriptname

Filename of the front php file, index.php by default

Variable var

Variable name used for validation ":nav" by default , exple index.php?:nav=article::list, but you can replace by "page", it will transform to index.php?page=article::list

Variable module.default

Default module, if there are no navigation variable defined

Variable action.default

Default action, if there are no navigation variable defined

Variable layout.erreur

Layout used when the framework display an error, if the "mode" variable is different to "dev" (see file conf/mode.ini.php)

Section [urlrewriting]

Introduction


  
[urlrewriting]
enabled=0
class=plugin_routing
conf
=../conf/routing.php
   


Variable enabled

Enable/disable url-rewriting

Variable class

Plugin class used to manage url-rewriting, plugin_routing by default

Variable conf

File where is configured routing rules for url-rewriting

Section [security]

Introduction


  
[security]
;
XSRF ou CSRF,bSecuriteXSRF utilisation de jeton dans le CRUDplus d'infos: http://fr.wikipedia.org/wiki/Cross-Site_Request_Forgeries
;XSS, bSecuriteXSS protection des variables GET,POST... via getParam( , plus d'
infos http://fr.wikipedia.org/wiki/XSS
xsrf.enabled=1
xsrf
.timeout.lifetime=360
xsrf
.checkReferer.enabled=1
xss
.enabled=1
xsrf
.session.enabled=0
   


Variable xsrf.enabled

Not used for moment, to use xsrf, used plugin_xsrf (cf tutorial)

Variable xsrf.timeout.lifetime

Lifetime of a token (time you have to fill and submit an form)

Variable xsrf.checkReferer.enabled

Enable/disable the url refferer check

Variable xsrf.session.enabled

Enable plugin xsrf to use session to increase security

Variable xss.enabled

Enable/disable xss security by a HTML translate by the method _root::getParam()

Section [log]

Introduction


  
[log]
class=
plugin_log
application
=0
warning
=0
error
=0
information
=0
   


More information there: http://mkdevs.com/faq_en.html#log

Variable class

Classe à utiliser pour loguer dans l'application

Variable application

Indique si le log de l'application est activé ou non

Variable warning

Indique si le log de niveau "warning" de l'application est activé ou non

Variable error

Indique si le log de niveau "error" de l'application est activé ou non

Variable information

Indique si le log de niveau "information" de l'application est activé ou non (choix d'un module/action à charger, appel d'une requête sql...)

Section [check]

Introduction


  
[check]
class=
plugin_check
   


Variable class

Indique le nom de la classe à utiliser lors des vérification coté modèle (champ non vide, numérique)

Section [site]

Introduction


  
[site]
;
Redirection
;header header('location:$url ')
;
http: <html><head><META http-equiv="refresh" content="0; URL=$url ></head></html>
redirection.default=header
timezone=Europe/Paris
   


Variable redirection.default

Indique le type de redirection à utiliser: header ou http

Variable timezone

Indique le décalage horaire par défaut de toutes les fonctions date/heure
Plus d'infos ici: http://php.net/manual/fr/function.date-default-timezone-set.php

Section [path]


  
[path]
lib=../../../../lib/framework/

data=../data/
upload=../data/upload/
log=../data/log/
img=../data/img/
i18n=../data/i18n/
cache=../data/cache/

conf=../conf/
module=../module/
plugin=../plugin/
model=../model/
layout=../layout/

view=view/
    


Permet d'indiquer l'ensemble des chemins utilisés par le framework

Section [model]

Introduction


  
[model]
ini.var=db
   


Variable ini.var

Indique le nom de la section où trouver les profils de connexion

Fichier mode.ini.php

Section [site]

Introduction


  
[site]
mode=dev
   


Variable mode

Indique le mode de l'application "dev" : affiche les erreurs...,"production" devient muet