From e147d399e999476d785f63f4bb6c3f44a65c2b16 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 20 Mar 2007 03:35:11 +0000 Subject: updated faq. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@955 4979c152-3d1c-0410-bac9-87ea11338e46 --- doc/faq.html | 421 ++++------------------------------------------------------- 1 file changed, 29 insertions(+), 392 deletions(-) diff --git a/doc/faq.html b/doc/faq.html index 1e3c3fb8..9ccee91f 100755 --- a/doc/faq.html +++ b/doc/faq.html @@ -37,83 +37,7 @@ Unfortunately, since this problem involves information loss, no solution can be automated without invalidating your accounting information.

-

  • Restoring old SQL-Ledger backups

    -PostgreSQL added a restriction in v8.x that a sequence cannot be dropped -after if it is referenced by a table. However backups created with -SQL-Ledger v2.6.13 and earlier have a DROP SEQUENCE step in the backup -which will fail. To fix this edit the backup before restoring on a 8.x -system. - -

    This typically looks like this: -

    -DROP SEQUENCE id ;
    -CREATE SEQUENCE id START 10579;
    ---
    -DROP SEQUENCE invoiceid ;
    -CREATE SEQUENCE invoiceid START 11096;
    ---
    -DROP SEQUENCE orderitemsid ;
    -CREATE SEQUENCE orderitemsid START 178;
    ---
    -DROP SEQUENCE jcitemsid ;
    -CREATE SEQUENCE jcitemsid START 53;
    -
    - -

    Change it to: -

    -CREATE SEQUENCE id;
    -SELECT SETVAL('id', 10579);
    -CREATE SEQUENCE invoiceid;
    -SELECT SETVAL('invoiceid', 11096);
    -CREATE SEQUENCE orderitemsid;
    -SELECT SETVAL('orderitemsid', 178);
    -CREATE SEQUENCE jcitemsid;
    -SELECT SETVAL('jcitemsid', 53);
    -
    - - -

  • PostgreSQL template1

    - -template1 is a template that new databases are built from, by -default. Anything you put into template1 will be copied to a -new database. Thus, when you try to create a new dataset, the tables -are already drawn in from template1 so that when LedgerSMB -tries to create them, you will receive an error message indicating -that the tables already exist. - - -

  • Japanese characters

    -modify apache so that EUC_JP is the main additional language. -
    comment out all unrelated languages except, UTF_8 shift jis, EUC_JP -
    restart apache -
    Fire up psql and do the encoding as per the table:- -
    Table 5-2. Postgres Client/Server Character Set Encodings - -

    Server Encoding Available Client Encodings -
    EUC_JP EUC_JP, SJIS -
    EUC_TW EUC_TW, BIG5 -
    LATIN2 LATIN2, WIN1250 -
    LATIN5 LATIN5, WIN, ALT -
    MULE_INTERNAL EUC_JP, SJIS, EUC_KR, EUC_CN, EUC_TW, BIG5, LATIN1 to LATIN5, WIN, ALT, WIN1250 - -

    Create the dataset from admin.pl, now the Japanese shows up in multibyte encoding - -

    Now you can write in Hiragana, Katakana, Kanji and English - - -

  • Error posting a check/receipt

    -
    -DBD::Pg::db do failed: ERROR: syntax error at or near "," at character 114
    -Error!
    -INSERT INTO acc_trans (trans_id, chart_id, transdate,amount)
    -VALUES (13314, , '03-22-2005',1.00 * 1)
    -ERROR: syntax error at or near "," at character 114 
    -This error is caused by a transaction which does not have links to -an AR/AP account. -
    set up your chart of accounts properly and create at least one -AR and AP account. Then edit all your transactions and repost. - - +

  • SELinux

    http://fedora.redhat.com/docs/selinux-faq-fc3/index.html @@ -132,12 +56,7 @@ recv_msg };
    allow httpd_sys_script_t sysctl_kernel_t:file read;
    allow httpd_sys_script_t unconfined_t:unix_stream_socket connectto; - -

  • session timeouts

    -If you get frequent timeouts or can't even log in, synchronize -the clocks between the server and workstation. - - +

  • lineitems not printing

    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 @@ -150,142 +69,40 @@ conversions: unix2dos and dos2unix. Windows users can obtain these utilities as Cygwin.

    -

  • UTF-8 character encoding

    -Most of the translations are in ISO format. To convert the translations -change directory to locale/cc and convert the files with iconv to UTF-8. -You should also convert the COAs too and make sure you select UTF-8 -encoding when you set up a new dataset. - -

  • characterset problems

    If you have problems displaying the correct characterset try adding
     AddDefaultCharset On
    in your httpd.conf file. -

  • About installation

    -The easiest is to use the setup.pl script as root. -You don't need to know very much about your system, just login as root, -run 'perl setup.pl' and follow the prompts. -

    setup.pl does not check for missing software packages and it is your -responsibility to make sure you have the required software -installed either from source or from a package. - -

    Requirements are clearly indicated in the README file and -on the download page. - -

  • cannot create function

      -
    1. either run createlang plpgsql to install the plpgsql -language handler or install yourself. For more information how to do -that, visit PostgreSQL and -read the interactive documentation for procedural languages. +
    2. Run: createlang -U postgres plpgsql ledgersmb to install the +plpgsql language handler into the "ledgersmb" database. More information on this +utility can be found at the interactive documentation at the +PostgreSQL site. -
    3. load admin.pl -
    4. unlock the system -
    5. login
    -

  • The requested URL /ledger-smb/admin.pl was not found

    -Your webserver doesn't know where to find the script. Most commonly this -results when distributions hide webserver configuration files in unexpected -locations so that setup.pl wasn't able to configure the location for -you. Find out which file (httpd.conf, httpdcommon.conf, ...) -controls your webserver configuration and add -
    -  # LedgerSMB
    -  Include /etc/httpd/ledger-smb-httpd.conf
    - -Create a file 'ledger-smb-httpd.conf' in /etc/httpd and copy the next part -into the file. - -
    -  AddHandler cgi-script .pl
    -  AddDefaultCharset On
    -  Alias /ledger-smb /var/www/ledger-smb/
    -  <Directory /var/www/ledger-smb>
    -    Options ExecCGI Includes FollowSymlinks
    -  </Directory>
    -
    -  <Directory /var/www/ledger-smb/users>
    -    Order Deny,Allow
    -    Deny from All
    -  </Directory>
    -replace '/etc/httpd' and '/var/www' with the appropriate directories. - - -

  • users/members : Permission denied

    -Your webserver must have write access to the users directory. -If your server runs as user/group 'apache:apache' then set the -users directory to owner/group apache:apache. -
    -  # chown -R apache:apache users
    - - -

  • Dataset newer than version

    -You are trying to use an older version with a dataset which was -created with a newer version. - - -

  • PDF option not working

    -Check if you have latex and pdflatex installed. - - -

  • Apache 2.0 "error 500"

    -Some of the early versions of Apache 2.0 (< patchlevel 44) had a rewrite engine -which decoded escaped strings. This created a lot of problems and I worked -around it by escaping strings twice. -If you get a server 500 error 'filename too long' or if collapsed menus -don't expand you may have to adjusted the following code in -LSMB/Form.pm and change the number (44) on line 84. -
    -  # for Apache 2 we escape strings twice
    -  if (($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.(\d+)\.(\d+)/) && !$beenthere) {
    -    $str = $self->escape($str, 1) if $2 < 44;
    -  }
    - -

  • IDENT Authentication failed for user "ledger-smb"

    Edit pg_hba.conf and change authentication to
    -  local           all        all           MD5
    + local all all md5 + host all all 127.0.0.1/32 md5 -The file is in the 'data' directory of your postgresql installation. -This is different with every distribution so look for it. +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.
       # find / -name 'pg_hba.conf'
    -

    Some people can't read and seem to think 'localhost' is just some -fancy word for a local machine. -'localhost' is a host like any other host on a network. -A 'local' entry in pg_hba.conf will allow socket connections ONLY and -not allow a host connection. If you then try to connect to 'localhost', -PostgreSQL will come back with an authentication error. - -

    So, if the database resides on the same server as the web server, -forget you ever heard there is such a thing as 'localhost' and leave -the Host portion blank. -

    WARNING! 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. -

  • DBD-Pg for Mandrake 9.0

    -Mandrake did not package a compiled DBD-Pg package again, so install DBD-Pg -from the source package. -Install perl-DBD-Pg-1.01-4mdk.i586.rpm from the 'contrib' area. -(Mandrake / 9.0 / contrib / RPMS) - - -

  • LaTeX error

    -If for some reason LaTeX produces an error message check for strange -characters in your account description and parts description -and use \usepackage[latin1]{inputenc} in the preamble. -

  • LaTeX templates

    If you don't want to edit tex code by hand, @@ -295,157 +112,35 @@ latex code. superior environment to produce professional-looking forms in postscript and PDF format. -

  • W3M

    -pass terminal=mozilla when you start w3m -
    -  $ w3m -F http://localhost/ledger-smb/login.pl?terminal=mozilla
    - -To use without frames -
    -  $ w3m http://localhost/ledger-smb/login.pl?terminal=lynx
    +

  • Use without Frames

    + +To use without frames, add ?path=/bin/lynx to the login URL: +
    http://localhost/ledger-smb/login.pl?path=/bin/lynx

  • PDF option disappeared

    -Edit ledger-smb.conf and set: +Edit ledgersmb.conf and set: latex = 1 -

  • Installation on Windows (WIN32)

    - - -

  • What do I enter for the language

    -If you use English, nothing, if you want to use a foreign language for -the login screen and admin stuff enter the language code, this is the -directory in the locale directory. - -

  • printing to a printer

    -Printers are defined in ledger-smb.conf +Printers are defined in ledgersmb.conf
    -%printer = ( 'Default' => 'lpr', 'Color' => 'lpr -PEpson' );
    +[printers] +Default = lpr +Color = lpr -PEpson Check in your /etc/printcap file for the names of available printers.

    If you have LaTeX installed set

    -  $latex = 1
    in ledger-smb.conf + latex = 1 + in ledger-smb.conf -

    To send the document to the printer check the "Postscript" or "PDF" format, -enter the number of copies and click on the "Print" button. - -

    The printer you enter in your preferences is the default printer. -You can choose any other available printer. This makes it possible -to print from anywhere on the network to any printer. - -

    Note: html format is for screen preview. Use the "Print" option from your +

    Note: html data entry format is for screen preview. +Use the "Print" option from your browser to print to a printer. -

  • Using samba to send printjobs to a printer attached to a Windows XP workstation

    -The next part applies to roll your own print filters only. If you use CUPS or -LPRng your milage may vary but you can still use this as a guide how it works. -I use the printer 'Epson' as an example which is -attached to a XP workstation called Raven. - -
    -/etc/printcap entry on the server which runs lpd
    - 
    -epson:Epson\
    -  :sh:\
    -  :lp=/dev/null:\
    -  :sd=/var/spool/output/epson:\
    -  :if=/usr/libexec/lpr/epson/prnfilter:\
    -
    -# end of entry in /etc/printcap
    -
    -
    -# prnfilter shell script
    -#!/bin/sh
    -# Filter for Epson Stylus
    -
    -PATH="$PATH:/usr/local/bin"
    -
    -#read first_line
    -read tmp
    -first_line=`echo $tmp | cut -b1-2 | sed -n '1p'`
    -
    -first_chr=`expr "$first_line" : '\(.\)'`
    -first_two=`expr "$first_line" : '\(..\)'`
    -rewindstdin
    -
    -if [ "$first_two" = "%!" ]; then # Postscript file
    -  gs @st640p.upp -dSAFER -dNOPAUSE -q -sOutputFile=/tmp/$$ -
    -else
    -  # text file
    -  cat > /tmp/$$
    -  echo -n "^L" >> /tmp/$$
    -  smbclient '\\Raven\Epson' "" -c 'printmode text'
    -fi
    -
    -smbclient '\\Raven\Epson' "" -P -c "print /tmp/$$"
    -rm /tmp/$$
    -
    -# EOF
    -
    -
    -rewindstdin is a small program to rewind the filehandle for STDIN
    -save the next part up to EOF to a file rewindstdin.c and compile
    -
    -#include <sys/types.h>
    -#include <unistd.h>
    -extern int errno;
    -main()
    -{
    -  if( lseek(0,0,0) == 0 ){
    -    errno = 0;
    -  }
    -  return( errno );
    -}
    -
    -# EOF
    -
    -compile to an executable
    -
    -gcc -o /usr/local/bin/rewindstdin rewindstdin.c
    -
    - -

  • beginning balances

    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 @@ -486,25 +181,10 @@ not packaged follow this recipe to get it working.
    $ make test
    if all went well su to root
    # make install -
  • remove DBD-Pg +
  • remove the DBD-Pg directory -

  • login.pl has compilation error

    - -This could be because of a missing configuration file in the users directory - -

    check the permission for the users directory. The directory must be -set writeable for the webserver. If your webserver runs ias user/group -nobody.nogroup set the directory to -

    -drwx--x--x   2 nobody   nogroup    1024 May 26 16:49 users
    -
    -or
    -
    -drwxrwx--x   2 johndoe  nogroup    1024 May 26 16:49 users
    - -

  • script not executing, shows in browser instead

    Add @@ -513,38 +193,6 @@ Add in your httpd.conf file. -

  • permission denied

    - -Check if your web server has write permission to write to the following -files and directories: -
    -  users/
    -  templates/
    -  users/members
    -
    -  # chown nobody:nogroup users templates users/members
    -
    - - -

  • permission denied to access tables

    -The user you entered in the "Database section" must be a valid -database user who has rights to access the tables. - -

    If the tables are owned by 'joe' and you enter 'mary' as the dba -you might run into this problem if mary doesn't have the rights to -access tables owned by joe. - - -

  • html and graphics files don't show up on screen

    - -Enable Includes and FollowSymlinks Options in your httpd.conf file -
    -  <Directory /usr/local/ledger-smb>
    -    Options ExecCGI Includes FollowSymlinks
    -  </Directory>
    -
    - -

  • switch display to a foreign language

    Load your preferences and select the language. @@ -555,19 +203,14 @@ ISO 3166-1 standards.

  • Text shows in English when I use a foreign language

    -This is because the corresponding hash entry is missing. -Add the missing text in the locale/cc/all or locale/cc/missing -file and run 'perl locales.pl' from the command line to rebuild -the individual files. - -
    cc refers to the country code. - +This is because the corresponding entry in the .po file. +Add the missing text the appropriate .po

  • switch to a foreign language for the login and admin screen

    Edit ledger-smb.conf and enter the code for the $language variable
    -  $language = "de";
    + language = "de"

    This is a global change and applies to all logins, individual settings may be changed by setting the language in your Preferences. @@ -577,18 +220,12 @@ may be changed by setting the language in your Preferences.


    +

    LedgerSMB security