$Id: readme_english.txt,v 1.4 2009-12-30 11:25:30 fraynaud Exp $ ======================================= All the documentation of openMairie on: http://www.openmairie.org ======================================= Prerequisite : ============ You must have the following services installed : - Apache server with php extension - database server : mysql or postgresql You should report to the installations of : - for windows : wamp (http://www.wampserver.com/) or easyphp(http://easyphp.fr/) - for Linux : lamp In case you use postgresql, you also have to install postgresql (http://www.postgresqlfr.org/) If you're new to all that, it'd be easier to keep mysql that comes included in the easyphp or wamp package. Since version 1.11, it is now possible to perform an easy install(1) This install should interest you : - if you want to make a quick try - if you don't have any other openMairie application - if you want to install openexemple on a provider platform (be careful to have an access to a mysql or pgsql database server) The normal installation with dependencies is still possible(2), it is recommended if you can perform administration tasks on your server. You can set up your global search(3) How to store your pictures and documents ?(4) Finally, some links about functional documentations openexemple(5) 1- Easy install [default] ================ 1.1 - Install openmairie_exemple copy the openmairie_exemple folder on your server examples wamp/www/openmairie_exemple for Linux (Debian) : var/www/openmairie_exemple 1.2 - Initialize the MySQL or postgresql database create the openexemple database on mysql or pgsql Then, you have to create the database tables then execute the following SQL scripts : - for mysql : openmairie_exemple/data/mysql/init.sql - for pgsql openmairie_exemple/data/pgsql/init.sql The first initialisation runs with init.sql The version upgrades run with ver.version-number example: to upgrade to version 1.08 : ver1.08.sql 1.3 setting up the connection in /dyn/base.php default settings : * collectivite 1 (with mysql) : coll[1] is a php array containing the following connection settings 'titre => 'openexemple (mysql)',[openexemple setting] 'phptype' => 'mysql', [do not change dbpear setting] 'dbsyntax' => '',[do not change dbpear setting] 'username' => 'root', [default setting on wamp easyphp or lamp / see with provider if needed] 'password' => '' [default setting on wamp easyphp or lamp / see with provider if needed] 'protocol' => '', 'hostspec' => 'localhost', [default server name for wamp or easyphp] 'port' => '', [do not change dbpear setting] 'socket' => '', [do not change dbpear setting] dbname => 'openexemple', [openexemple setting] default date format =>'AAAA-MM-JJ' [do not change openexemple setting] * collectivite 2 (with pgsql) : coll[2] is a php array containing the following connection settings 'titre => 'openexemple (pgsql)',[openexemple setting] 'phptype' => 'pgsql', [do not change dbpear setting] 'dbsyntax' => 'pgsql',[do not change dbpear setting] 'username' => 'postgres', [default install setting for postgre / see with provider if needed] 'password' => 'postgres' [default install setting for postgre / see with provider if needed] 'protocol' => 'tcp', 'hostspec' => 'localhost', [default server name for wamp or easyphp] 'port' => '5432', [do not change dbpear setting] 'socket' => '', [do not change dbpear setting] dbname => 'openexemple', [openexemple setting] default date format =>'AAAA-MM-JJ' [do not change openexemple setting] BE CAREFUL : Do not forget to backup the folder /trs where are stored all the digital datas (photos, pdf...) On Linux, you have to set the "write" permissions (see 2.5) Setting up the logo (see 2.6) 2. Installing openexemple with dependencies =============================== This install is more complicated but it is more coherent on the Apache side if several applications use the same components. Please report on the full documentation on the adullact website on the following address (French) http://openmairie.org/documentation/installation 2.1 - installing the 3 libraries (mandatory) example with wamp or Linux (ubuntu / Debian) pear : wamp/php/pear /usr/share/php/PEAR PEAR Base System PHP : http://pear.php.net/package/PEAR pear db : http://www.pear.php.net/package/DB fpdf : wamp/php/fpdf /usr/share/fpdf http://www.fpdf.org openmairie : wamp/php/openmairie or /usr/share/php/openmairie http://www.openmairie.org version >= 2.01 2.2 - modify the path in php.ini * example for windows with wamp5 include_path= ".;c:\wamp\php\includes;c:\wamp\php\pear;c:\wamp\php\fpdf;c:\wamp\php\openmairie" * example for Linux (Debian or ubuntu : /etc/php5/Apache2/php.ini): include_path = ".:/usr/share/php:/usr/share/php/openmairie:/usr/share/fpdf" 2.3 - Installing openmairie_exemple * copy the openmairie_exemple folder on your server examples wamp/www/openmairie_exemple for Linux (Debian) : /var/www/openmairie_exemple 2.4 - Initialize the MySQL database create the openexemple database then execute the following SQL scripts : * with mysql openmairie_exemple/data/mysql/init.sql = creating the tables (mandatory) * with postgre openmairie_exemple/data/pgsql/init.sql = creating the tables (mandatory) set up the connection in /dyn/base.php (see 1.3) * in dyn/var.inc set the following variables with no value $path_fpdf, $path_om, $path_pear the first initialization is done with init.sql the version upgrades are done with ver.version_number example: to upgrade to version 1.08 : ver1.08.sql 2.5- Linux : setting the write permissions for Apache (www-data) * trs folder : file transfer /var/www/openmairie_exemple$ sudo chown www-data:www-data trs /var/www/openmairie_exemple$ sudo chmod 755 trs * tmp folder : writing the process results /var/www/openmairie_exemple$ sudo chown www-data:www-data tmp * sql/mysql/ folder : writing and modifying the states and sub states /var/www/openmairie_exemple$ sudo chown www-data:www-data mysql /var/www/openmairie_exemple$ sudo chown www-data:www-data mysql * sql/pgsql/ folder : writing and modifying the states and sub states /var/www/openmairie_exemple$ sudo chown www-data:www-data pgsql /var/www/openmairie_exemple$ sudo chown www-data:www-data pgsql (Debian / ubuntu) 2.6 logo per collectivity Template and status : For each collectivity, put the logo in the /trs/coll corresponding (coll= number of the collectivity) Be careful, the logo must be named like in trs : ex : logopdf.png trs/1 logopdf.png trs/2 logopdf.png ... 3 - global search ========== Global search can be configured in dyn/var.inc to optimize large response times when starting the application // 1 = calculate all occurrences then possible search on input // 0 = only calculate on input search $global_flag=1; (default) 4- Functional documentation =================== http://www.openmairie.org/documentation 5 - parameters ; dyn/var.inc =================== * mode demo $demo=1; // login.php mode demo =1 and mode not demo =0 *global search on board $global_tdb=1; or 0 * global search on menu top : 1 ou 0 $global_haut=1; * ergonmia choice on board $look_tdb=1; * dependancies (pear + fpdf + openmairie) -> with dependancies $path_om=""; $path_pear= ""; $path_fpdf=""; -> without dependancies $path_om="../php/openmairie/"; $path_pear= "../php/pear/"; $path_fpdf="../php/fpdf/"; * internationalization $langue="francais"; // francais, anglais, allemand, espagnol * verrou double validation $verrou=1; // verrou =1 actif 0= inactif ===================================== * language can be configured in dyn/var.inc $langue="francais"; (default) actual options: - francais= french - anglais=english - espagnol= spanish - allemand= german ===================================== =============== LOGIN PASSWORD =============== demo/demo admin/admin =============