FAQ - Installation

Q1: Each time I choose an option, any one, I'm presented with the login screen again

webERP uses sessions to store the access level of the user. Sessions allow information to be retained between web pages. Some installations of php do not have session support working by default. The settings in the php.ini relating to sessions are critical. Windows PHP distributions used to use:

session.save_path = /tmp

Windows doesn't like this directory. All php sessions will fail until this is fixed. Changing to:

session.save_path = C:\windows\temp

should resolve the problem.

Another possible cause is that the browser is not setup to use cookies. webERP sessions are propogated through cookies - files stored by your browser on your machine. Enable cookies on your browser.

Q2: I can't use PHP MyAdmin to create the database I get the message:

MySQL said:

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near -----

PHPMyAdmin does not like files created with mysqldump. The installation instructions are based around the mysql client for that reason. The mysql client program can be run from a DOS window under windows or a terminal window for *nix. Under windows the .exe file is under C:\mysql\bin\mysql.exe by default. Under Windows XP and 2000 click start, run then enter 'cmd' then press ENTER to open DOS window. To create the database enter

>C:\mysql\bin\mysql.exe --user=root < /path_to_the_sql_scripts/web-erp-demo.sql

Q3: I can start webERP ok, but when I try to enter an order (or purchase order/receipt/payment) after selecting a customer I get the message:

Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition cart of the object you are trying to operate on was loaded _before_ the session was started in /usr/local/httpd/htdocs/web-erp/SelectOrderItems.php on line 282

This error occurs because some linux distributions that came bundled with PHP or were installed from an .rpm file were installed with the setting for session_auto_start in php.ini set to 1. Classes/objects cannot be defined before a session is started so any php script which needs an object to run will fail. The solution is to edit the php.ini file - normally C:\Windows\php.ini or /usr/local/lib/php.ini to change session.auto_start = 0 then restart the web server.

This was a PHPism that was resolved in PHP 4.3 - Version 4.3 or later is recommended for webERP 3.00 onwards.

Q4: I get the following error message or similar:

Warning: session_start(): open(C:\Program Files\PHP\sessiondata\sess_35560340884acf1c04184d4df2830fb2, O_RDWR) failed: Permission denied (13) in c:\inetpub\wwwroot\web-erp\includes\session.inc on line 14

This error means that the directory where you have indicated that session information should be held is not writable by the web-server. The permissions in the session directory need to be changed so that the web-server can write to it. Using one of chmod, chown or chgrp

Q5: I get the following error message or similar:

Notice: Undefined index: AttemptsCounter in c:\inetpub\wwwroot\web-erp\includes\session.inc on line 20

A notice like this is not an error as such ? it is acceptable to use variables without first initialising them in PHP. To avoid showing these notices a configuration directive in php.in needs to be modified. Look for the line in php.ini
error_reporting = E_ALL; display all errors, warnings and notices
and change it to :
error_reporting = E_ALL & ~A_NOTICE

The web-server may need to be restarted - a CGI installation will not need to be restarted. This setting is now enabled by default using a configuration directive in config.php that turns notices off. This error is unlikely to resurface in versions since 2.8

In fact this is now the default error_reporting setting used by webERP - this error reporting mode is activated when PHP parses the file config.php which is included in every script (by includes/session.inc)

Q6: The links on each page do not work I keep getting page not found errors when selecting menu links.

Some installations appear not to be able to work out the value of the variable $rootpath using the line

$rootpath = dirname($_SERVER['PHP_SELF']);

in config.php. The symptom described is the result. If all else fails just change the $rootpath variable to be the name of the directory under the web server root directory where the scripts are held. EG. by default this would be:

$rootpath = '/weberp';

note the trailing / is not required.

Q7: I am starting from a point well into the business can I start issuing PO and invoices using the same sequence I am already running?

Yes. Use a DB tool like phpMyAdmin to edit the current transactions numbers in the table SysTypes. This table stores the current transaction number for all transaction types. eg. Sales invoices are typeid=10 and sales credit notes are typeid=11 - simply change the typeno field to the number you would like the next invoice/credit note to start at.
Sales orders also have their own systype and the next sales order can be entered in the same way as above.

Q9: When printing an invoice (and other pdf's) the system creates a new page in the same browser. When you go back, using the browser buttons, you get a page expire notice

This behaviour depends on whether you elect to have pdfs opening in a browser window or opening a new instance of acrobat. The best way to run webERP in my view is to open pdfs in acrobat directly. This requires that you set some preferences under the internet section to open pdfs in acrobat reader.

Q10: WebERP should display a default image for each Inventory item, why doesn't this work?

Check the permissions on your WebERP directory. All the files should be owned by your webserver. Try: "chown apache.apache /path/to/weberp -R".

Q11: When generating pdf reports I get a message similar to the following:

Warning: Cannot modify header information - headers already sent by (output started at /weberp/includes/php-gettext/gettext.php:716) in /weberp/PDFCustomerList.php on line 344

This is because there is a space after the last ?> which marks the end of the php code. The space is interpreted as html and therefore sending a header which says it is a pdf generates an error.

Normally this is in the config.php file at the very end - some editors put this extra space in automatically and most unhelpfully.

Q12: I get the following error message:

Warning: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead. in C:\AppServ\www\weberp\includes\LanguageSetup.php on line 27

Warning: setlocale() [function.setlocale]: Invalid locale category name LC_MESSAGES, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME. in C:\AppServ\www\weberp\includes\LanguageSetup.php on line 27

The answer is to edit the file includes/LanguageSetup.php

Look for the following section:

This maybe reqiured in some installations
$Locale = setlocale (LC_ALL, $_SESSION['Language']);

$Locale = setlocale (LC_CTYPE, $_SESSION['Language']);
$Locale = setlocale (LC_MESSAGES, $_SESSION['Language']);

now take out the before

$Locale = setlocale (LC_ALL, $_SESSION['Language']);

and add
before the following two lines:

$Locale = setlocale (LC_CTYPE, $_SESSION['Language']);
$Locale = setlocale (LC_MESSAGES, $_SESSION['Language']);

Some systems handle this differently. It is configured by default in the way which suits most installs.

Q13: I encounter this error message: Database Error : Can't find file: 'config.MYI' (errno: 2)

This can happen on MYISAM tables - the default (non-transaction capable) table type in MySQL.

webERP should be installed with innodb tables though. It is important that all the tables be converted to innodb.
From the installation doc:

"New Installations


- A working PHP web server - v 4.3 or later - with mysql or postgres databases and ftp
- A working MySQL or Postgres server (MySql version 4.1 or above - innodb tables must be enabled - this needs a my.cnf file - see the MySQL manual. Postgres v 7.4 or later).

Installing these components are well covered elsewhere."

Innodb are the transaction aware tables of choice for mysql - do a google search on innodb.
Accounting software using non-transaction aware tables is definitely NOT recommended. Do not use webERP with the default table type in mysql - innodb must be enabled on your mysql server. "

Q14: The company name entered does not correspond to a database on the database server specified in the config.php configuration file. Try logging in with a different company name

This occurs in versions >= 3.02 where the name of the database created for webERP data does not correspond with the directory where the company specific information is held. The webERP distribution has a directory called companies and under this directory further directories named based on the companies that the installation will serve. By default - a new installation will have just one directory "weberp". If the name of the database created is not called weberp then the result when attempting to login will be as above. Notice that the config.php file where the database name used to be entered no longer has a $DatabaseName variable - this is because the database name is taken as the company name used for login. The database name used is in fact the company abbreviation - used for login. The default behaviour of the login screen is to list all the directory names under the companies directory - this behaviour can be over-ridden using the new parameters in config.php as of 3.02

$AllowCompanySelectionBox = true;

changing this to false will not show all the companies directories on the system - this would be inappropriate in a 3rd part hosted accounting environment.

$DefaultCompany = 'weberp';

This selects this company by default in the login screen - if there is no database of this name on the database server host then the same error as above will occur.

This has created some complications where the database is served by 3rd party hosting company as they can often prepend some text prior to your database name when creating databases under your account. You must then determine the name of the database and change the directory name under the companies folder to the name of the database. All companies defined must have a separate directory under the main webERP directory companies directory - the name of this directory must correspond exactly to the name of the database that is created for the company on the database host.

eg. In the case of the weberp demo host - they prepended our domain - so the database was actually called weberp_demo where the database was called simply demo when it was created. The solution was simply to change the name of the companies directory from demo to weberp_demo.

This error also occurs if you have the database, but the user in config.php have no rights to access it.
E.g. if your user is WebErpUsr, then grant it privileges on the mysql shell:
mysql> GRANT ALL PRIVILEGES ON weberp.* TO 'WebErpUsr'@'localhost' IDENTIFIED BY 'secretpassword';

Q15: Client does not support authentication protocol requested by server error

When try to login I am getting the error message:

"Client does not support authentication protocol requested by server; consider upgrading MySQL client in
W:\xxx\webERP\includes\ConnectDB_mysql.inc on line 7

This error is caused by the database being created in a different version to your installation.

See the explanation at: http://dev.mysql.com/doc/refman/5.0/en/old-client.html

The simple fix is to go into your mysql command line with:

mysql -u yourMySQLusername



Q16: *Warning*: putenv(): Safe Mode warning: Cannot set environment variable 'LANG' - it's not in the allowed list in /xxxx/xxxx/xxxx/web-erp/includes/LanguageSetup.php

and similar errors like:

*Warning*: putenv(): Safe Mode warning: Cannot set environment variable 'LANGUAGE' - it's not in the allowed list in * /xxxxx/xxxxx/xxxx/web-erp/includes/LanguageSetup.php *on line *32*

This requires modifications to the php.ini file /etc/php.ini under linux and C:\windows\php.ini

You will find a line starting with:

safe_mode_allowed_env_vars = PHP_

add the following:

safe_mode_allowed_env_vars = PHP_, LANG

Q17: Using webERP with Postgres

Postgres support was withdrawn with 3.05. As with many things the people who originally committed to support Postgres had either moved on or for other reasons been unable to maintain it and so it fell to me (Phil) to support it. I had to install Postgres and test all queries etc and this took my time up. Since connection time is better with mysql (other arguments about the relative performance of each db aside) and establishing a connection with each page is the major time cost of db work on web-applications, I decided I would rather develop other functionality than continue to put time into maintaining Postgres. I asked for a Postgres champion to step forward but sadly no-one did!

Should mysql lisencing change, we could easily go back to support Postgres but for now it has been dropped.

Please see this page:

Q18: How to import GL history and the chartdetails table (technical)

If you want GL history - by that I mean trial balances, balance sheets and profit and loss accounts to be imported you do not need to bring in all the transactions into the gltrans table which is of course a particularly heavy table. You can do this simply by importing data into the chartdetails table.

The chartdetails table contains:

actual - the movement on the account in the period
bfwd - the balance on the account brought forward from the previous period

For profit and loss accounts we are interested in the total of all the movements in each account over the period range selected - ie just the sum of the amounts.
For balance sheet accounts we are interested in the balance at any period end. This will be the bfwd + actual

Similar logic applies to the bfwdbudget and budget fields for the budgets.

We need to have a chartdetails record for every period so that we can run trial balances, profit and loss accounts and balance sheets for every period.

Note that a repost of general ledger transactions (using the Z_Report.... script) starting from a period where there are no transactions imported will have a nasty effect on your imported chartdetails amounts since it zeros all bfwd amounts after the period of your repost and all actual amounts including the period where the repost starts from and recalculates the actual and bfwd for each following period. The bfwd amount being the previous periods bfwd + actual. Posting $100 to period 1 would increase the actual in period 1 by $100 and all subsequent bfwd balances by $100.

The balancing factor on the balance sheet is the retained earning account which is the sum of all the bfwd+actual for all profit and loss accounts as at the end of the period under review.

I am sure there are many ways to "skin a cat" but I must say I remain quite pleased with this logic. The posting of general ledger transactions happens so fast its almost unoticable - although I did spend some time optimising the sql to do this in queries rather than php loops. Also any range of periods can be selected to look at the p & l and balance sheet as at any period end - no month end no year end routines to run.

There is foreign key checking on the chartdetails table such that there must always be a matching period record in the periods table.

Q19: I do not have a submit button on my configuration page

Normally this is because the user that is the owner of the web-server process in linux often the user "nobody" does not have read write permissions on the directories below the webERP/companies/YOUR COMPANY/ directory. For all companies served by your webERP installation there must be a separate database and a directory under the webERP/companies which is the same name as the database used for the company. Under this directory is where all the files relevant to that company are stored. When the configuration setting page is brought up it attempts to read the directories below this directory to see the options available for storing part pictures, incoming EDI messages etc... If it can't read these directories then it chokes and dies!!

Solution - change the permissions to enable the web-server user to read and write to these directories
if your webERP files are stored under /usr/local/apache2/htdocs/webERP then

#chmod -R ug+rw /usr/local/apache2/htdocs/webERP/companies/
#chown -R nobody /usr/local/apache2/htdocs/webERP

would do the trick - there are various ways of doing this through GUI tools.

Q20: Installation on a NuOnce-BQ-CentOS machine

Anyone trying to install ((http://www.weberp.org webERP)) onto any domain in a ((http://www.bluequartz.org BlueQuartz)) Server using ((http://www.nuonce.net NuOnce)) BQ-CD (currently at ((http://www.nuonce.net/bq-cd.php v4.7))) which is based on CentOS will find that the magic_quotes_gpc setting in the php.ini file causes a problem. It's resolution can be found ((http://www.nuonce.net/support/viewthread.php?tid=1512 here)). To install the latest CVS WebERP - ((http://www.weberp.org webERP)) - we find that we need to toggle the magic_quotes_gpc setting. This is achieved by editing the file

Q21: I want to install using a different company name without first installing company weberp

The steps you need to take are :

1 log into mysql, as described in the install doc.
2 Create a database named whatever you want, eg CREATE DATABASE mycompany;
3 Change to using that database eg use mycompany;
4 run the sql script to generate tables. eg weberp-new.sql
5 rename the companies/weberp folder to be companies/mycompany or create
a copy of the old one with this name.
6 change $defaultcompany in config.php to be mycompany.
7 login as demo.

Its important that the database name and the company name, and the folder
in companies/ are all the same

Another option if you have webERP installed using the demo database

You could then use the script Z_MakeNewCompany.php - just type this script name over index.php in the URL location bar of your browser. This script creates the new directories described above and the new database. If the config.php script has the option

$AllowCompanySelectionBox = true;

As it is by default then you will be able to choose between logging into the weberp database or the new company database you created when running the Z_MakeNewCompany.php script above. If you only want to run the new company then you can delete the


directory and all directories under it from the web-server (you can also drop the weberp database - as a new one is created by Z_MakeNewCompany.php) - the new company will have its own


directory and sub-directories created when running the Z_MakeNewCompany.php

Q22: The .htaccess file causes an error when hosting with 1and1

In order to make modifications to the operation of PHP on a 1and1 hosted account and hostgator (and potentially others), a php.ini file is required. These hosts do not allow a .htaccess file to modify the php configuration - a 500 error is returned - in particular we wish to disable magic quotes and register globals.

The solution is to delete the entries in the existing .htaccess file, and place into a new file titled php.ini, the following two lines:
magic_quotes_gpc = off
register_globals = off

Upload this php.ini file to the root directory.

Additionally, you can force 1and1 to interpret the .php files using PHP5 by entering the following into the .htaccess file:
AddType x-mapp-php5 .php

Valid XHTML :: Valid CSS: :: Powered by WikkaWikiGet webERP Accounting & Business Management at SourceForge.net. Fast, secure and Free Open Source software downloads