farmerswife

Welcome
Login  Sign up

How to use the "server.cfg" when working with a separate TEST farmerswife Server

This article describes the recommended best practice on working on and with a separate TEST farmerswife (fw) Server. The key part here is, to use the "server.cfg" file within the fw Server's "system" folder. Note that this file can also be very helpful on the actual "Production" farmerswife Server.

A separate TEST farmerswife Server might be needed when running on Beta versions, or new Service Packs or in general when you first want to run an upgrade check or evaluate new modules or new functionality on a separate TEST WIFE Server installation.

You can always use a WIFE Server in "demo mode" (also with your DB files) and it will run for 60 min. and you have 40 sessions.

An additional "TEST Server" license can be provided upon request, available for customer with a valid service agreement in place; include in your request the Company Name, the info of the local static IPv4 address and the used Operating System of the machine to host the TEST WIFE Server.

IMPORTANT: farmerswife supports Push and Feed functionality, and various other email notifications (if enabled); and it can be integrated to various other 3rd party systems; and you can also break out folder structures to network shares which are normally locally hosted on the WIFE Server's host machine, etc.

All this functionality is therefore also enabled by default on a separate new TEST WIFE Server environment you might be using. And if not handled with care and turned OFF in a good way, this will lead to duplicate or wrong notifications to your users, or update wrong information on your real live Production farmerswife system.

For a "half way realistic" test environment, copy the "system" folder from your WIFE PRODUCTION Server, more info below!

Depending on how you use farmerswife, you might also need to copy other files or folders.

Use the "server.cfg" file to control certain vital parts of your separate TEST Server:

This "server configuration" file (server.cfg) provides the option to change certain "General tab" settings "outside" of the actual WIFE Server application. You use this file to ensure certain settings are not enabled on your TEST WIFE Server.

These settings/variables are available by default on v6.4:

FW_IP
FW_PORT
EXTERNAL_PORT
HTTP_PORT
HTTP_HOME
USE_SSL
HTTP_SSL_PORT
HTTP_UPLOAD_PORT
FTP_ALLOW
FTP_PORT
FTP_PASV_PORT
FILE_PORT
PROXY_FILE_PORT
FILE_PORT_LOW
FILE_PORT_HIGH
MAIL_OK
MAIL_SERVER
MAIL_PORT
MAIL_USER
MAIL_PASSWORD
USE_SQL
SQL_USER
SQL_PASS
SQL_DB_HOST
SQL_DB_NAME
SQL_PORT
PRJ_CHECK_FOLDERS
MAIL_DEBUG
BARN_ACTIVE
HTTP_XML_PORT
WEBCLIENT20_ENABLED
WEBCLIENT20_PORT
WEBCLIENT20_COM_PORT
ALLOW_FORCE_RUN_NIGHTLY_SCRIPT
ALLOW_FORCE_RUN_PLAY_BILLABLES
TIMED_SCRIPTS_INTERVAL_SECONDS
MSAD_ENABLED
USE_EXCHANGE
READ_SCRIPTS_AS_UTF8
GOOGLE_SYNC
CIRKUS_ENABLED
FORCE_SHUTDOWN
USE_MSAZUREAD
PASSWORD_POLICIES_SRC default_password_policies.json
USE_THREADS


These are additional settings/variables not set by default:
APNS_ENABLED
EXCHANGE_DEBUG  
HTTP_DEBUG
LDAP_DEBUG


Note: Since v6.4 these two settings/variables are special, because on a "standard" and "not externally proxied" fw Server installation, both of these will have the SAME port value!

FILE_PORT
PROXY_FILE_PORT


On our "Demo DB" these settings/variables will look like this:
FILE_PORT 24000
PROXY_FILE_PORT 24000


Note: Only licensed features and their variables will be effected by any changes within this .cfg file.

A proper WIFE Test installation works like this:

- Quit your farmerswife PRODUCTION WIFE Server.
- Create a file called "server.cfg" within your PRODUCTION WIFE Server's "system" folder.
- Start up your PRODUCTION WIFE Server for the first time with the "server.cfg" file in place, then Quit it again, to trigger flushing your existing configuration settings into this "server.cfg" file.
- Install the TEST WIFE Server application on your test machine.
- Now copy at least the "system" folder from your WIFE "production" Server to within your "test" WIFE Server's installation folder. If you have the time, feel free to also copy the "files" folder; and if you have customized anything within the "html_templates" or "/lib/scripts/...", copy these sub-folders, and IF you are using anything "customized" within these folders, the related files might need to be copied as well.

BEFORE (!) the first start-up of the TEST WIFE Server, edit the server.cfg file with a text editor application within your TEST WIFE Server's "system" folder and add or set at least these variables to "0", like this:
MAIL_OK 0
USE_SQL 0
APNS_ENABLED 0
MSAD_ENABLED 0
USE_EXCHANGE 0
GOOGLE_SYNC 0
CIRKUS_ENABLED 0
USE_MSAZUREAD 0

Save the server.cfg file. Copy it again to a "safe" location on your test machine, so you can re-use it for the next DB file updates.
Now start your TEST WIFE Server application.

NOTE: to test "Allow Mail" functionality from a "test" WIFE Server, you can use for example a service like "Mailtrap" (http://mailtrap.io).

You then need to update this variables with your access details:
MAIL_OK
MAIL_SERVER
MAIL_PORT
MAIL_USER
MAIL_PASSWORD

Repeat the above steps, for any upgrade or repeated update of the "system" folder on your Test WIFE Server.
We recommend to save the correctly configured "server.cfg" file for the TEST environment in a good way, and then simply replace it prior to the first start-up.

NOTE: Once you have properly configured your TEST WIFE Server as mentioned above, you can save time in the future and only copy these files from your PRODUCTION WIFE Server > from within the "system" folder:
- current45.efdb
- fwdb.db3
- histories.db3
- despatches.db3

Did you find it helpful? Yes No