ActiveWAFL Crash Course

The WAFL Cones Ice Cream Shop, Version 1.0

3.1 Configure the application environment settings

ActiveWAFL applications can be setup differently for each environment you have it running in.
We'll focus on the development environment.

Define the environment

You must set an environment variable named WAFL_ENVIRONMENT to the value "dev".
There are many different ways to do this.
If you're using apache then you probably don't need to change anything, as the default application has an .htaccess file in the web's document root directory that already sets WAFL_ENVIRONMENT to "dev" using Apache's SetEnv directive.
Other web servers have similar mechanisms for setting environment variables for it's run-time environment.

You can set also set the environment variable using commands within your operating system.
This can usually be done per user or per machine.

Configure Wafl Cones

There is a settings file for each environment.

Edit the file Config/Settings.dev.syrp to look like the following, replacing the values with something that makes sense for your environment.

  1. Application
  2.     GuestGroupId                =   1
  3.  
  4. Debug
  5.     SuppressErrors              =   0
  6.     DebugMode                   =   1
  7.     AutoUpdateDb                =   0
  8.  
  9. Paths
  10.     Application
  11.         LocalRoot               =   "c:/My Documents/Web Sites/d.WaflCones.com/"
  12.         PublicWebFolder         =   "Public/"
  13.         DefaultPage             =   "LandingPage.php"
  14.         TempFolder              =   "c:/tmp/d.WaflCones.com"
  15.         UploadFolder            =   "Uploads/"
  16.         GlobalEventHandlers     =   "GlobalEventHandlers.php"
  17.         GlobalScript            =   "GlobalScript.php"
  18.     Wafl
  19.         WaflFolder              =   "../shared/Wafl/"
  20.         DblEjFolder             =   "../shared/DblEj/"
  21.  
  22. Web
  23.     DomainName                  =   "d.waflcones.com"
  24.     WebUrl                      =   "http://d.waflcones.com/"
  25.     WebUrlSecure                =   "https://d.waflcones.com/"
  26.     WebUrlRelative              =   "/"
  27.     SiteEmail                   =   "noreply@d.waflcones.com"
  28.     CookieLifetime              =   350000
  29.     SiteDisplayTitle            =   Wafl Cones Ice Cream Shop
  30.     GlobalStylesheetHasTokens   =   0

You may need to change the LocalRoot, TempFolder, WaflFolder, DblEjFolder, DomainName, WebUrl, WebUrlSecure, DataStorage Uri, db-username, and db-password settings.
You can probably leave the other settings at their defaults.

Next, we'll set up the application's Site Structure.