$Id: readme_english.txt,v 1.1 2008-05-30 21:12: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 openCimetiere 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. With version 1.11 come various scripts for data integration if you're in a process of massive data input(3) You can set up your global search(4) How to store your pictures and documents ?(5) Finally, some links about functional documentations openCimetiere(6) 1- Easy install [default] ====================== 1.1 - Install openmairie_cimetiere copy the openmairie_cimetiere folder on your server examples wamp/www/openmairie_cimetiere for Linux (Debian) : var/www/openmairie_cimetiere 1.2 - Initialize the MySQL or postgresql database create the opencimetiere database on mysql or pgsql Then, you have to create the database tables then execute the following SQL scripts : - for mysql : openmairie_cimetiere/data/mysql/init.sql - for pgsql openmairie_cimetiere/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 => 'opencimetiere (mysql)',[opencimetiere 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 => 'opencimetiere', [opencimetiere setting] default date format =>'AAAA-MM-JJ' [do not change opencimetiere setting] * collectivite 2 (with pgsql) : coll[1] is a php array containing the following connection settings 'titre => 'opencimetiere (pgsql)',[opencimetiere 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 => 'opencimetiere', [opencimetiere setting] default date format =>'AAAA-MM-JJ' [do not change opencimetiere setting] BE CAREFUL : Do not forget to backup the folder /trs where are stored all the digital datas (photos, orders, authorization...) On Linux, you have to set the "write" permissions (see 2.5) Setting up the logo (see 2.6) 2. Installing opencimetiere 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/demonstration/opencimetiere-1/installation_opencimetiere.pdf/view 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_cimetiere * copy the openmairie_cimetiere folder on your server examples wamp/www/openmairie_cimetiere for Linux (Debian) : /var/www/openmairie_cimetiere 2.4 - Initialize the MySQL database create the opencimetiere database then execute the following SQL scripts : * with mysql openmairie_cimetiere/data/mysql/init.sql = creating the tables (mandatory) * with postgre openmairie_cimetiere/data/pgsql/init.sql = creating the tables (mandatory) set up the connection in /dyn/base.php * 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_cimetiere$ sudo chown www-data:www-data trs /var/www/openmairie_cimetiere$ sudo chmod 755 trs * tmp folder : writing the process results /var/www/openmairie_cimetiere$ sudo chown www-data:www-data tmp * sql/mysql/ folder : writing and modifying the states and sub states /var/www/openmairie_cimetiere$ sudo chown www-data:www-data mysql /var/www/openmairie_cimetiere$ sudo chown www-data:www-data mysql * sql/pgsql/ folder : writing and modifying the states and sub states /var/www/openmairie_cimetiere$ sudo chown www-data:www-data pgsql /var/www/openmairie_cimetiere$ sudo chown www-data:www-data pgsql (Debian / ubuntu) 2.6 logo per collectivity (version 1.10) 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 - Integrating datas (version 1.11) ================= In var.inc you have the possibility to display or not the menu integration dyn/var.inc -> variable $integration_temp See rec/methode_integration.pdf for the explanation of the process (in French) 4 - global search (version 1.11) ============= 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) If you have several concessions (more than 5000), set this flag to 0. 5 - pictures and pdf documents storage (concessions acts, manual files...) ================================== There is an option to sort files and pictures by folder of 100 files so it can be easier to manage than a stock of thousands of files in the same folder. However, this option disconnects the possibility to modify the files (avoid complexity) Storage of files by folder of a hundred of concessions is a parameter in var.inc: $dossierparcentaine=1; Default setting is 1. If you have less than 300 concessions, you can set this to 0 (that will give less than 1000 files in the folder) Files are identified as following in the trs folder: if collectivity = 1 and $dossierparcentaine=1 For the concession number 1512 : the picture is : trs/1/15/p_1512.jpeg the first file : trs/1/15/d_1512.pdf the second file : trs/1/15/d_1512_2.pdf BE CAREFUL : Do not forget to backup the folder /trs where are stored all the digitalized datas (pictures, orders, authorizations...) 6 Functional documentation ========================= Documentation from "association des maires 74" http://openmairie.org/demonstration/opencimetiere-1/documentation_1-05.pdf/view Documentation proposed by the city of Toulouse http://openmairie.org/demonstration/opencimetiere-1/manuelutilisateuropencimetiere4sept2007.pdf/view 7 advices for developers ======================= Before starting the modification of the application code : - you can modify many parameters in dyn/var.inc - you can modify state, sub state, template from the menu If despite these possibilities you wish to modify the code, you can find the file obj/concession_toulouse.class.php as an example of the possibility to modify the code by overloading the existing methods : concession_toulouse.class.php inherits from concession.class.php and overloads the methods of concession.class.php In fact, you limit your maintaining only to the added part. Modify then the menu : tab.php?obj=concession_toulouse instead of concession