VDaemon PHP Library | VDaemon Extension | Table of Contents

VDaemon User Guide
VDaemon Setup

Before you start using VDaemon you need to setup it properly.

Installation

VDaemon comes in zip archive "vdaemon.zip". To install VDaemon unpack it to any folder under web site root on your web server. VDaemon files must be accessible from the internet. It's recommended to unpack it into "<website_root>/vdaemon" folder.

Configuration

VDaemon configuration options are located in the config.php file in VDaemon installation folder:

$sVDaemonSecurityKey - this key is used by VDaemon to prevent form validation rules from changing or avoiding by person with malicious intentions. While this key kept secret you can be sure that your validation rules are genuine. It is strongly recomended to change this key after installation. Do not use common words for this. This key is not a password - you do not need to memorize it and can change it at any time. So, values like "kjgdf69maluhjltr6qt154vic" is exactly what you need. It can be of any length (but more than 10 characters is recomended).

VDAEMON_POST_SECURITY - defines VDaemon's behavior on action page in case of POST request. If form data has been sent using POST method but validation data of the form is missing then there is a risk that your form is under attack - someone tries to avoid validation process. In this case VDaemon behavior depends on VDAEMON_POST_SECURITY option. If VDAEMON_POST_SECURITY is true then VDaemon will generate error and stop, otherwise VDaemon will skip validation. You can set this option for each specific page ("define" statement should be placed before VDaemon "include" like shown below):

define('VDAEMON_POST_SECURITY', false);
include('vdaemon'php');

VDAEMON_USE_BUNDLED_PEAR - defines which PEAR.php file will be used by VDaemon. VDaemon uses XML_HTMLSax PEAR package to parse html pages. This package comes with VDaemon installation. This allows VDaemon to work if PEAR is not installed or not configured properly on your web server, but it can cause a conflict between PEAR packages.

If VDAEMON_USE_BUNDLED_PEAR option is set to "true" then VDaemon will use bundled PEAR package (comes with VDaemon)
If VDAEMON_USE_BUNDLED_PEAR option is set to "false" then VDaemon will try to find PEAR installation on web server and use PEAR from there. If it will not be found VDaemon will use bundled PEAR package.

You must set this option to "false" if you plan to use other PEAR functionality and VDaemon simultaneously.

VDAEMON_SIMULATE_SELFSUBMIT - if set to "true" VDaemon simulates selfsubmit form behavior. I.e. in case of errors you will have post variables available on the form page.
Note: you always can get post variables from $_VDAEMON global array.

VDAEMON_SAVE_DATA - defines whether VDaemon must save submitted forms data to a session.