Comments on php.ini settings for CGI php mode.
[fa-stable.git] / install.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><title>FrontAccounting</title></head>
3 <body>
4 <div><strong><span style="font-size: 20pt;"><span style="color: rgb(204, 102, 0); font-style: italic;">Front</span>Accounting
5 Installation</span></strong></div>
6 <h2>Pre-requisites</h2>
7 <ul style="margin-top: 0pt;" type="disc">
8 <li>A working HTTP web server eg. <em><strong>Apache,
9 IIS</strong></em>. </li>
10 <li><strong><em>PHP</em></strong>
11 installed on the web server. </li>
12 <li>A working <strong><em>MySQL</em></strong>
13 server - with <strong><em>innodb</em></strong>
14 tables enabled (see notes below) </li>
15 <li><strong><em>Adobe Acrobat Reader</em></strong>
16 - for viewing the PDF reports before printing them out. </li>
17 </ul>
18 <h2>Important Notes</h2>
19 <ul>
20 <li>One critical aspect of the PHP installation is the setting
21 of <strong><em>session.auto_start</em></strong>
22 in the php.ini file. Some rpm distributions of PHP have the default
23 setting of <strong><em>session.auto_start = 1</em></strong>.
24 This starts a new session at the beginning of each script. However,
25 this makes it impossible to instantiate any class objects that the
26 system relies on. Classes are used extensively by this system. When
27 sessions are required they are started by the system and this setting
28 of <strong><em>session.auto_start</em></strong>
29 can and should be set to 0. </li>
30 <li>
31 For security reasons both Register Globals and Magic Quotes php settings 
32 should be set to Off. When FrontAccounting is used with www server running 
33 php as Apache module, respective flags are set in .htaccess file. When your
34 server uses CGI interface to PHP you should set 
35 <strong><em>magic_quotes_gpc = 0</em></strong> and 
36 <strong><em>register_globals = 0</em></strong> in php.ini file.
37 </li>
38 <li><strong><em>Innodb</em></strong>
39 tables must be enabled in the MySQL server. These tables allow database
40 transactions which are a critical component of the software. This is
41 enabled by default in the newer versions of MySQL. If you need to
42 enable it yourself, consult the MySQL manual. </li>
43 <li>FrontAccounting is implemented and tested with MySQL.
44 Generally
45 it should work with other databases, but this is not supported in any
46 way at the moment. </li>
47 </ul>
48 <h2>Copying all the project files to the correct directory</h2>
49 <ul>
50 <li>You must obviously have downloaded the project archive to
51 be reading this file. </li>
52 <li>All the files inside this archive should be copied to a
53 directory under the web server root directory. </li>
54 <li>For example, create a folder called <strong>/account</strong>,
55 and extract the archive into this folder. </li>
56 </ul>
57 <h2>Installation Steps (automatic, recommended)</h2>
58 <ol>
59 <li>If you have the option to create multiple databases on your
60 host, create one, fi. <strong>frontacc</strong>, otherwise
61 write down the database name for your account. At the same time look up
62 the username and password for the database. You will need these
63 informations during the wizard install. </li>
64 <li>Enter <strong><em>your_url/account/install</em></strong>
65 (or whatever directory you entered). This will run the install wizard,
66 setup a drill company and populating with initial data. You can later
67 on create your own real company. It is a good idea to get familiar with
68 the system before starting your own company.&nbsp; </li>
69 <li>After successfully install, remove or rename your install
70 directory for safety reasons. You don't need it any more.</li>
71 </ol>
72 <h2>Installation Steps (manuel, for advanced users, not
73 recommended)</h2>
74 <p><br />
75 </p>
76 <ol>
77 <li>
78 <h3>Creating the Database</h3>
79 <ol>
80 <li>NOTE : As FrontAccounting is still heavily under
81 development, the database structure will ALWAYS change between
82 releases, so if you have a database that you created for a previous
83 release of FrontAccounting, it WILL NOT WORK after installing a new
84 release.&nbsp;<br />Please look in the file <span style="font-weight: bold; font-style: italic;">Update.html</span> for how to handle this. </li>
85 <li>We strongly suggest using a GUI to manage your
86 database(s) and database users. If you don&#8217;t have any, download <a href="http://www.phpmyadmin.net/"><strong>phpMyAdmin</strong></a>.
87 </li>
88 <li>Create a database with a name of your choice. The
89 default in config_db.php is &#8216;<strong><em>frontacc</em></strong>&#8217;,
90 but of course you can select whatever name you desire. </li>
91 <li>Populate the database you have created. There are two
92 scripts
93 are provided to populate the database (both inside the folder /sql) :
94 <ol>
95 <li><strong><em>en_US-demo.sql</em></strong>.
96 This has a minimal amount of demonstration data set up so that
97 transactions can be tried to see how the system works. </li>
98 <li><strong><em>en_US-new.sql</em></strong>.
99 This script has
100 only the basic data necessary to start a new company system off. If you
101 wish to set up your company on FrontAccounting then this is the script
102 to use. </li>
103 </ol>
104 </li>
105 <li>Now that the database is created you will need to set
106 up a database user to access this database. DO NOT USE THE USER &#8216;ROOT&#8217;.
107 Set up a new user and give that user full privileges over the database
108 &#8216;frontacc&#8217;. </li>
109 <li>After successfully install, remove or rename your
110 install directory <strong><em>your_url/account/install</em></strong>
111 (or
112 whatever directory you entered) for safety reasons. You don't need it
113 any more.</li>
114 </ol>
115 </li>
116 <li>
117 <h3>Editing config_db.php</h3>
118 <ol>
119 <li><strong><em>config_db.php</em></strong>
120 contains connection information for the database. These must be set to
121 your local settings or you will not be able to access FrontAccounting. </li>
122 <li>FrontAccounting allows multiple connections, you can
123 enter as many connections as you have separate entities (most people
124 will use only one). </li>
125 <li><strong>$db_connections</strong> is an
126 array of connections &#8211; for each connection : </li>
127 <li>&#8220;<strong>name</strong>&#8221; is the name of the
128 connection, this is the name that will be displayed to the user </li>
129 <li>&#8220;<strong>host</strong>&#8221; is the computer IP
130 address or name where the database is. The default is localhost
131 assuming that the web server is also the sql server. </li>
132 <li>&#8220;<strong>dbuse</strong>r&#8221; is the user name
133 under which the database should be accessed. NB, again, do not use the
134 user ROOT. A user with appropriate privileges must be set up. </li>
135 <li>&#8220;<strong>dbpassword</strong>&#8221; is the
136 password for &#8220;dbuser&#8221;. You would have entered this when you created
137 &#8220;dbuser&#8221;. </li>
138 <li>&#8220;<strong>dbname</strong>&#8221; is the name of
139 the database. The provided scripts use the name OpenAccounting. </li>
140 <li>&#8220;<strong>tbpref</strong>&#8221; is the table
141 prefix for
142 the tables. If you only have access to one database, you must use table
143 prefix to separate the companies. Table prefix is set by a table prefix
144 counter inside config_db.php, fi. 0_ for the first company.</li>
145 </ol>
146 </li>
147 </ol>
148 <h2>&nbsp;Logging In For the First Time</h2>
149 <ol>
150 <li>Pleae ensure that the folder <strong>/company/0</strong>
151 on the server is <strong>writable</strong>. </li>
152 <li>Open a browser and enter the URL for the web server
153 directory where FrontAccounting is installed. </li>
154 <li>Enter the user name:&nbsp; '<strong>admin</strong>'
155 </li>
156 <li>Enter the password: '<strong>password</strong>'
157 </li>
158 <li>(NB : enter without quotation marks). </li>
159 <li>
160 <div>You can set up additional user accounts from the System
161 Setup
162 tab. Be careful not to delete the demonstration user until a new user
163 has been set up. If there are no users defined the next time you try to
164 login you won't be able to. The only way then to create a user to login
165 with is to manually edit the SQL table "users" to insert a user.</div>
166 </li>
167 </ol>
168 <h2>Setting Up Company Specific Data</h2>
169 <ol>
170 <li>All the standing configuration data is defined from the
171 Setup tab
172 and each link should be reviewed to enter appropriate data for the
173 business. Setup wizards that guide you through this process has been
174 implemented and we strongly recommend you to use this approach, see <strong><em>Installation
175 steps (automatic, recommended)</em></strong> . </li>
176 </ol>
177 <h2>Troubleshooting</h2>
178 <ol>
179 <li>If FrontAccounting is installed locally, you may have the <strong><em>session
180 save path</em></strong> not set correctly. Normally this is
181 set in your php.ini (for Windows). The entry is called <strong><em>session.save_path</em></strong>.
182 Make sure this is set to a directory that actually exists. The default
183 is set to /tmp, which may not be valid. </li>
184 <li>If you are installing FrontAccounting onto a shared server,
185 you may have to set the session save path within FrontAccounting. At
186 the top of&nbsp;
187 /includes/session.inc you will find this line : </li>
188 <li>Uncomment this line and set the path to a directory that
189 exists
190 on your server. Make sure that you have read/write privileges on this
191 directory. </li>
192 </ol>
193 <p>&nbsp;</p>
194 </body></html>