<ul> <li><h4>Printing to a Printer from a Windows Server</h4><p> There are several obstacles to printing from a web appliction that was written for Linux or UNIX in Windows. These include:</p><ul> <li>Lack of Postscript support in the printing subsystem. To resolve this, you must install Ghostscript and Gsview. The latter package provides a utility called gsprint that will allow you to print Postscript on your Windows printer.</li> <li>The fact that most Windows software, including gsprint, tends to print output that will cause the web server to crash. The winprint.bat included with this distribution corrects this problem. To use the winprint.bat solution, configure your printers in your ledger-smb.conf as "winprint.bat printer-name." If you omit the printer name, the default printer will be used.</li> <li>Windows does not allow you to set up system printers that all users can access. Thus the web server often doesn't have access to the printers you have set up. To correct this issue, follow the steps at <a href="http://support.microsoft.com/kb/q184291/"> http://support.microsoft.com/kb/q184291/</a>.</li></ul></li> <p><li><h4>Error on converting from SQL-Ledger: ERROR: column "chart_id" contains null values</h4> SQL-Ledger does not enforce a NOT NULL constraint on the chart_id field in the acc_trans table. Consequently, it is possible in cirtain circumstances to insert transactions into the database with invalid information including NULL chart_id's. When this occurs, normally the Chart of Accounts and Trial Balance will fail to balance. So this is a serious problem with data integrity. LedgerSMB prevents this by adding the NOT NULL constraing but this can cause prevent people from migrating when they have invalid data in their databases. <br/><br/> If you encounter an error like this, the first thing to do is seek technical support, regardless of whether or not you wish to continue the migration. In general the providers of support for LedgerSMB and SQL-Ledger should all be able to be of some assistance. Unfortunately, since this problem involves information loss, no solution can be automated without invalidating your accounting information. </li></p> <!-- This is from Dieter, so we should probably rewrite --> <p><li><h4>SELinux</h4> <a href=http://fedora.redhat.com/docs/selinux-faq-fc3/index.html>http://fedora.redhat.com/docs/selinux-faq-fc3/index.html</a> <p>modify <tt>/etc/selinux/conf</tt> and set <tt>SELINUX=permissive</tt> <p>use <tt>audit2allow</tt>, add the following to <tt>policy.conf</tt>, then run <tt>make reload</tt> <p>#line 83 <br>allow httpd_sys_script_t port_type:{ tcp_socket udp_socket } { send_msg recv_msg }; <br>allow httpd_sys_script_t sysctl_kernel_t:dir search; <br>allow httpd_sys_script_t sysctl_t:dir search; <br>allow httpd_sys_script_t tmp_t:sock_file write; <br>allow httpd_sys_script_t httpd_sys_content_t:lnk_file read; <br>allow httpd_sys_script_t sysctl_kernel_t:file read; <br>allow httpd_sys_script_t unconfined_t:unix_stream_socket connectto; <!-- verify and if necessary rewrite --> <p><li><h4>lineitems not printing</h4> Templates designed on a UNIX platform don't work on a DOS platform. To make them work load the template either with the builtin template editor or a text editor and save. Templates designed on a Windows platform have the same problem and won't work on a UNIX platform. Once you strip the ^M's the'll work just fine. </p><p> Note too that most Linux and UNIX installations come with two utilities for making these conversions: unix2dos and dos2unix. Windows users can obtain these utilities as part of <a href="http://www.cygwin.com">Cygwin</a>.</p> <p><li><h4>characterset problems</h4> If you have problems displaying the correct characterset try adding <pre> AddDefaultCharset On</pre> in your <tt>httpd.conf</tt> file. <p><li><h4>cannot create function</h4> <ol> <li>Run: <tt>createlang -U postgres plpgsql ledgersmb</tt> to install the plpgsql language handler into the "ledgersmb" database. More information on this utility can be found at the interactive documentation at the <a href=http://www.postgresql.org/docs/>PostgreSQL</a> site. </ol> <p><li><h4>IDENT Authentication failed for user "ledger-smb"</h4> Edit pg_hba.conf and change authentication to <pre> local all all md5 host all all 127.0.0.1/32 md5</pre> The file is often in the 'data' directory of your postgresql installation. In some distributions it may be in /etc/pgsql or a similar directory. A file search can be helpful when all else fails. <pre> # find / -name 'pg_hba.conf'</pre> <p><b>WARNING!</b> DO NOT just put a 'host all all trust' in pg_hba.conf unless you know what you are doing; that can introduce a pretty huge security hole. <p><li><h4>LaTeX templates</h4> If you don't want to edit tex code by hand, you could use Lyx, Abiword, or any WYSIWYG editor capable of exporting latex code. <p>LaTeX is somewhat complex to learn, initially, but offers a much superior environment to produce professional-looking forms in postscript and PDF format. <p><li><h4>Use without Frames</h4> To use without frames, add ?path=/bin/lynx to the login URL: <pre>http://localhost/ledger-smb/login.pl?path=/bin/lynx</pre> <p><li><h4>PDF option disappeared</h4> Edit ledgersmb.conf and set: latex = 1 <p><li><h4>printing to a printer</h4> Printers are defined in ledgersmb.conf <pre> [printers] Default = lpr Color = lpr -PEpson</pre> Check in your /etc/printcap file for the names of available printers. <p>If you have LaTeX installed set <pre> latex = 1 </pre> in ledger-smb.conf <p>Note: html data entry format is for screen preview. Use the "Print" option from your browser to print to a printer. <p><li><h4>beginning balances</h4> Add a GL Journal entry and enter the beginning balance for your accounts. Beginning balances are the balances from your last balance sheet. If you also add open invoices to account for COGS for inventory, add the invoices and make the appropriate adjustments. <p><li><h4>establish a beginning inventory</h4> add the parts with a vendor invoice. Use the <b>real cost</b> for the items, not zero. If you use zero cost then the cost of goods will be zero when you sell the item. <p><li><h4>Assemblies</h4> Assemblies are manufactured goods assembled from parts, services and assemblies. Because you do not buy assemblies you 'stock assemblies' by adding assembled units to your inventory. The quantity for individual parts is reduced and the quantity for the assembly increased. To disassemble an assembly you simply return the parts to inventory by entering a negative quantity for the number of assemblies to stock. <p><li><h4>DBD-Pg not installed</h4> Most modern distributions now package DBD-Pg. If it is not packaged follow this recipe to get it working. <ul> <li>check if you have the header files for PostgreSQL <br>$ find / -name 'libpq-fe.h' <br>if nothing shows up install the development package for PostgreSQL <li>download and untar DBD-Pg <li>set the environment variables POSTGRES_LIB and POSTGRES_INCLUDE <li>cd to DBD-Pg directory <br>as ordinary user <br>$ perl Makefile.PL <br>$ make <br>$ make test <br>if all went well su to root <br># make install <li>remove the DBD-Pg directory </ul> <p><li><h4>script not executing, shows in browser instead</h4> Add <pre> AddHandler cgi-script .pl</pre> in your httpd.conf file. <p><li><h4>switch display to a foreign language</h4> Load your preferences and select the language. <br>Language selection is in accordance to <a href=http://www.unece.org/cefact/locode/service/main.htm> ISO 3166-1</a> standards. <p><li><h4>Text shows in English when I use a foreign language</h4> This is because the corresponding entry in the .po file. Add the missing text the appropriate .po <p><li><h4>switch to a foreign language for the login and admin screen</h4> Edit ledger-smb.conf and enter the code for the $language variable <pre> language = "de"</pre> <p>This is a global change and applies to all logins, individual settings may be changed by setting the language in your Preferences. </ul> <p> <hr> <!-- still needs help --> <a name=security> <h1>LedgerSMB security</h1> </a> <ul> <pre> Typical setups: /usr/local/vh/www <- DocumentRoot for virtual host /usr/local/vh/ledger-smb <- Alias for ledger-smb /usr/local/vh/users <- users directory out of reach <hr width=60% align=left> /usr/local/vh/www <- DocumentRoot for virtual host /usr/local/vh/www/ledger-smb <- Alias for ledger-smb /usr/local/vh/www/ledger-smb/users <- users configuration files and tmp space <Directory /usr/local/vh/www/ledger-smb/users> <- disable webserver access Order Deny,Allow for users directory Deny from All </Directory> </pre> The location for the users directory can be specified in ledger-smb.conf <p><li>Set permission for the users and templates directory to 711 <p><li>If you do not want anyone to change the templates with the built-in editor set the files in templates/directory/ to read only or disable the menu item to edit the templates. <p><li>You can set up a read-only environment if you disable the menu items to add data. i.e 'Add Transaction' if unchecked you will not be able to add a transaction or repost a transaction. You may look at it but nothing else. <p><li>There are various settings for audit control and you may disable reposting entirely or up to a certain date. And with the audit trail enabled you can keep tab of who is doing what. <p><li>For PostgreSQL you may also set who has access to the server in the file pg_hba.conf <p><li>in addition you can secure the tables from unauthorized access by setting up a different database user and GRANT rights. For instance, users without DELETE rights will still be able to use the program, change customers and vendors, add transactions but will not be able to delete or repost transactions. <br>To lock all the tables to create a RO system GRANT SELECT rights only. <p><li>Other security options include a secure shell, your webserver's authentication system, SSL, encrypted tunnels, ... </ul> </BODY> </HTML>