summaryrefslogtreecommitdiff
path: root/doc/faq.html
blob: 9ccee91ff8bcc5e59080a479190f1817a3ae331b (plain)
  1. <ul>
  2. <li><h4>Printing to a Printer from a Windows Server</h4><p>
  3. There are several obstacles to printing from a web appliction that was written
  4. for Linux or UNIX in Windows.
  5. These include:</p><ul>
  6. <li>Lack of Postscript support in the printing subsystem. To resolve this, you
  7. must install Ghostscript and Gsview. The latter package provides a utility
  8. called gsprint that will allow you to print Postscript on your Windows
  9. printer.</li>
  10. <li>The fact that most Windows software, including gsprint, tends to print
  11. output that will cause the web server to crash. The winprint.bat included
  12. with this distribution corrects this problem. To use the winprint.bat
  13. solution, configure your printers in your ledger-smb.conf as
  14. "winprint.bat printer-name." If you omit the printer name, the default
  15. printer will be used.</li>
  16. <li>Windows does not allow you to set up system printers that all users can
  17. access. Thus the web server often doesn't have access to the printers you
  18. have set up. To correct this issue, follow the steps at
  19. <a href="http://support.microsoft.com/kb/q184291/">
  20. http://support.microsoft.com/kb/q184291/</a>.</li></ul></li>
  21. <p><li><h4>Error on converting from SQL-Ledger:
  22. ERROR: column "chart_id" contains null values</h4>
  23. SQL-Ledger does not enforce a NOT NULL constraint on the chart_id field in the
  24. acc_trans table. Consequently, it is possible in cirtain circumstances to
  25. insert transactions into the database with invalid information including NULL
  26. chart_id's. When this occurs, normally the Chart of Accounts and Trial Balance
  27. will fail to balance. So this is a serious problem with data integrity.
  28. LedgerSMB prevents this by adding the NOT NULL constraing but this can cause
  29. prevent people from migrating when they have invalid data in their databases.
  30. <br/><br/>
  31. If you encounter an error like this, the first thing to do is seek
  32. technical support, regardless of whether or not you wish to continue
  33. the migration. In general the providers of support for LedgerSMB and
  34. SQL-Ledger should all be able to be of some assistance.
  35. Unfortunately, since this problem involves information loss, no
  36. solution can be automated without invalidating your accounting
  37. information. </li></p>
  38. <!-- This is from Dieter, so we should probably rewrite -->
  39. <p><li><h4>SELinux</h4>
  40. <a href=http://fedora.redhat.com/docs/selinux-faq-fc3/index.html>http://fedora.redhat.com/docs/selinux-faq-fc3/index.html</a>
  41. <p>modify <tt>/etc/selinux/conf</tt> and set <tt>SELINUX=permissive</tt>
  42. <p>use <tt>audit2allow</tt>, add the following to
  43. <tt>policy.conf</tt>, then run <tt>make reload</tt>
  44. <p>#line 83
  45. <br>allow httpd_sys_script_t port_type:{ tcp_socket udp_socket } { send_msg
  46. recv_msg };
  47. <br>allow httpd_sys_script_t sysctl_kernel_t:dir search;
  48. <br>allow httpd_sys_script_t sysctl_t:dir search;
  49. <br>allow httpd_sys_script_t tmp_t:sock_file write;
  50. <br>allow httpd_sys_script_t httpd_sys_content_t:lnk_file read;
  51. <br>allow httpd_sys_script_t sysctl_kernel_t:file read;
  52. <br>allow httpd_sys_script_t unconfined_t:unix_stream_socket connectto;
  53. <!-- verify and if necessary rewrite -->
  54. <p><li><h4>lineitems not printing</h4>
  55. Templates designed on a UNIX platform don't work on a DOS platform.
  56. To make them work load the template either with the builtin template editor
  57. or a text editor and save. Templates designed on a Windows platform have the
  58. same problem and won't work on a UNIX platform. Once you strip the ^M's
  59. the'll work just fine.
  60. </p><p>
  61. Note too that most Linux and UNIX installations come with two utilities for making these
  62. conversions: unix2dos and dos2unix. Windows users can obtain these utilities as part of
  63. <a href="http://www.cygwin.com">Cygwin</a>.</p>
  64. <p><li><h4>characterset problems</h4>
  65. If you have problems displaying the correct characterset try adding
  66. <pre>
  67. AddDefaultCharset On</pre>
  68. in your <tt>httpd.conf</tt> file.
  69. <p><li><h4>cannot create function</h4>
  70. <ol>
  71. <li>Run: <tt>createlang -U postgres plpgsql ledgersmb</tt> to install the
  72. plpgsql language handler into the "ledgersmb" database. More information on this
  73. utility can be found at the interactive documentation at the
  74. <a href=http://www.postgresql.org/docs/>PostgreSQL</a> site.
  75. </ol>
  76. <p><li><h4>IDENT Authentication failed for user "ledger-smb"</h4>
  77. Edit pg_hba.conf and change authentication to
  78. <pre>
  79. local all all md5
  80. host all all 127.0.0.1/32 md5</pre>
  81. The file is often in the 'data' directory of your postgresql
  82. installation. In some distributions it may be in /etc/pgsql or
  83. a similar directory. A file search can be helpful when all else fails.
  84. <pre>
  85. # find / -name 'pg_hba.conf'</pre>
  86. <p><b>WARNING!</b> DO NOT just put a 'host all all trust' in
  87. pg_hba.conf unless you know what you are doing; that can introduce a
  88. pretty huge security hole.
  89. <p><li><h4>LaTeX templates</h4>
  90. If you don't want to edit tex code by hand,
  91. you could use Lyx, Abiword, or any WYSIWYG editor capable of exporting
  92. latex code.
  93. <p>LaTeX is somewhat complex to learn, initially, but offers a much
  94. superior environment to produce professional-looking forms in
  95. postscript and PDF format.
  96. <p><li><h4>Use without Frames</h4>
  97. To use without frames, add ?path=/bin/lynx to the login URL:
  98. <pre>http://localhost/ledger-smb/login.pl?path=/bin/lynx</pre>
  99. <p><li><h4>PDF option disappeared</h4>
  100. Edit ledgersmb.conf and set:
  101. latex = 1
  102. <p><li><h4>printing to a printer</h4>
  103. Printers are defined in ledgersmb.conf
  104. <pre>
  105. [printers]
  106. Default = lpr
  107. Color = lpr -PEpson</pre>
  108. Check in your /etc/printcap file for the names of available printers.
  109. <p>If you have LaTeX installed set
  110. <pre>
  111. latex = 1
  112. </pre> in ledger-smb.conf
  113. <p>Note: html data entry format is for screen preview.
  114. Use the "Print" option from your
  115. browser to print to a printer.
  116. <p><li><h4>beginning balances</h4>
  117. Add a GL Journal entry and enter the beginning balance for your accounts.
  118. Beginning balances are the balances from your last balance sheet. If you also
  119. add open invoices to account for COGS for inventory, add the invoices
  120. and make the appropriate adjustments.
  121. <p><li><h4>establish a beginning inventory</h4>
  122. add the parts with a vendor invoice. Use the <b>real cost</b> for the items,
  123. not zero. If you use zero cost then the cost of goods will be zero when you
  124. sell the item.
  125. <p><li><h4>Assemblies</h4>
  126. Assemblies are manufactured goods assembled from parts, services and
  127. assemblies. Because you do not buy assemblies you 'stock assemblies' by
  128. adding assembled units to your inventory. The quantity for individual parts
  129. is reduced and the quantity for the assembly increased. To disassemble an
  130. assembly you simply return the parts to inventory by entering a negative
  131. quantity for the number of assemblies to stock.
  132. <p><li><h4>DBD-Pg not installed</h4>
  133. Most modern distributions now package DBD-Pg. If it is
  134. not packaged follow this recipe to get it working.
  135. <ul>
  136. <li>check if you have the header files for PostgreSQL
  137. <br>$ find / -name 'libpq-fe.h'
  138. <br>if nothing shows up install the development package for PostgreSQL
  139. <li>download and untar DBD-Pg
  140. <li>set the environment variables POSTGRES_LIB and POSTGRES_INCLUDE
  141. <li>cd to DBD-Pg directory
  142. <br>as ordinary user
  143. <br>$ perl Makefile.PL
  144. <br>$ make
  145. <br>$ make test
  146. <br>if all went well su to root
  147. <br># make install
  148. <li>remove the DBD-Pg directory
  149. </ul>
  150. <p><li><h4>script not executing, shows in browser instead</h4>
  151. Add
  152. <pre>
  153. AddHandler cgi-script .pl</pre>
  154. in your httpd.conf file.
  155. <p><li><h4>switch display to a foreign language</h4>
  156. Load your preferences and select the language.
  157. <br>Language selection is in accordance to
  158. <a href=http://www.unece.org/cefact/locode/service/main.htm>
  159. ISO 3166-1</a> standards.
  160. <p><li><h4>Text shows in English when I use a foreign language</h4>
  161. This is because the corresponding entry in the .po file.
  162. Add the missing text the appropriate .po
  163. <p><li><h4>switch to a foreign language for the login and admin screen</h4>
  164. Edit ledger-smb.conf and enter the code for the $language variable
  165. <pre>
  166. language = "de"</pre>
  167. <p>This is a global change and applies to all logins, individual settings
  168. may be changed by setting the language in your Preferences.
  169. </ul>
  170. <p>
  171. <hr>
  172. <!-- still needs help -->
  173. <a name=security>
  174. <h1>LedgerSMB security</h1>
  175. </a>
  176. <ul>
  177. <pre>
  178. Typical setups:
  179. /usr/local/vh/www <- DocumentRoot for virtual host
  180. /usr/local/vh/ledger-smb <- Alias for ledger-smb
  181. /usr/local/vh/users <- users directory out of reach
  182. <hr width=60% align=left>
  183. /usr/local/vh/www <- DocumentRoot for virtual host
  184. /usr/local/vh/www/ledger-smb <- Alias for ledger-smb
  185. /usr/local/vh/www/ledger-smb/users <- users configuration files and tmp space
  186. &lt;Directory /usr/local/vh/www/ledger-smb/users&gt; <- disable webserver access
  187. Order Deny,Allow for users directory
  188. Deny from All
  189. &lt;/Directory&gt;
  190. </pre>
  191. The location for the users directory can be specified in ledger-smb.conf
  192. <p><li>Set permission for the users and templates directory to 711
  193. <p><li>If you do not want anyone to change the templates with the built-in
  194. editor set the files in templates/directory/ to read only or disable
  195. the menu item to edit the templates.
  196. <p><li>You can set up a read-only environment if you disable the menu items
  197. to add data. i.e 'Add Transaction' if unchecked you will not be able to add
  198. a transaction or repost a transaction. You may look at it but nothing else.
  199. <p><li>There are various settings for audit control and you may disable
  200. reposting entirely or up to a certain date. And with the audit trail enabled
  201. you can keep tab of who is doing what.
  202. <p><li>For PostgreSQL you may also set who has access to the server in the file
  203. pg_hba.conf
  204. <p><li>in addition you can secure the tables from unauthorized access by
  205. setting up a different database user and GRANT rights. For instance,
  206. users without DELETE rights will still be able to use the program, change
  207. customers and vendors, add transactions but will not be able to delete or
  208. repost transactions.
  209. <br>To lock all the tables to create a RO system GRANT SELECT rights only.
  210. <p><li>Other security options include a secure shell, your webserver's
  211. authentication system, SSL, encrypted tunnels, ...
  212. </ul>
  213. </BODY>
  214. </HTML>