The purpose of server side configuration is to provide more control of the hosted sites to the server owner. All these variables are used to increase security of the server, by limiting developers access rights to certain server data (environmental variables, paths above virtual hosts wwwroot directory, writing files during run-time), or by limiting the ability to use some WBSP functionalities (scripting host, file upload, full definition of ADO connection string, limiting number of instances of the WBSP engine that can be used simultaneously by single virtual host or even disabling WBSP on certain virtual hosts) or by strictly defining the rules by which WBSP can be used in CGI mode.
Server-side configuration variables :
AbsolutePath
DefaultDocument
MaxInstances
RegCode
Upload
read more
WhizBase Help Blog
Monday, November 1, 2010
Server configuration section
This section contains specific server side configuration for all aliases of a single virtual host defined in Servers section. It has to be created for every virtual host that needs separate configuration different from default settings. Here's an example:
[wbsp.com]
DisableWB=F
AbsolutePath=On
Upload=On
FileCommands=On
Execute=JavaScript,VBScript,JScript
HiddenEnvVars=PATH,COMP*,System*
TimeOutSec=20
DefaultDocument=index.wbsp
ADOConnectionString=T
ActivateCGIByExt=wbsp
CGISecurityString=LhBv3KP
MaxInstances=0
HideDocuments=sr,aut,inc,ic,mdb
ScriptTimeOutSec=60
[dsd.ba]
DisableWB=F
AbsolutePath=Off
Upload=On
FileCommands=Off
Execute=VBScript
HiddenEnvVars=PATH,COMP*,System*,Win*
TimeOutSec=10
DefaultDocument=default.wbsp
ADOConnectionString=F
ActivateCGIByExt=wbsp
CGISecurityString=LhBv3KP
MaxInstances=10
DisableWB=F
AbsolutePath=On
Upload=On
FileCommands=On
Execute=JavaScript,VBScript,JScript
HiddenEnvVars=PATH,COMP*,System*
TimeOutSec=20
DefaultDocument=index.wbsp
ADOConnectionString=T
ActivateCGIByExt=wbsp
CGISecurityString=LhBv3KP
MaxInstances=0
HideDocuments=sr,aut,inc,ic,mdb
ScriptTimeOutSec=60
[dsd.ba]
DisableWB=F
AbsolutePath=Off
Upload=On
FileCommands=Off
Execute=VBScript
HiddenEnvVars=PATH,COMP*,System*,Win*
TimeOutSec=10
DefaultDocument=default.wbsp
ADOConnectionString=F
ActivateCGIByExt=wbsp
CGISecurityString=LhBv3KP
MaxInstances=10
SF (WB_Command) - Send file
Description
This command is used for sending unchanged file defined in variable WB_TempName to client. The file will not be processed or changed in any way, regardless of its content or type.
read more
This command is used for sending unchanged file defined in variable WB_TempName to client. The file will not be processed or changed in any way, regardless of its content or type.
read more
Subsection [MsgAndLbl]
This subsection contains the variables that define labels and style for navigation links (for previous, next, first and last page) and messages (empty recordset and deleted records). They can contain any valid HTML code including WhizBase report tags and functions both in input and output syntax.
It can also contain variables for formatting navigation links WB_Style.
These are variables that can be stored in this subsection (in alphabetic order):
WBM_NoMatch
Here is the example of MsgAndLbl section (marked blue):
Titles
$wbnavigator
To test this example, create images rightarrow.gif, leftarrow.gif, first.gif and last.gif and place them in directory images located in same directory with this wbsp file. Also create images of the digits 0 to 9 (name them 0.gif, 1.gif, 2.gif, ..., 9.gif) and place them in directory digits located in same directory with this wbsp file.
read more
It can also contain variables for formatting navigation links WB_Style.
These are variables that can be stored in this subsection (in alphabetic order):
WBM_NoMatch
Here is the example of MsgAndLbl section (marked blue):
Year published | Title | ISBN |
$wbf[Year published] | $wbf[title] | $wbf[ISBN] |
To test this example, create images rightarrow.gif, leftarrow.gif, first.gif and last.gif and place them in directory images located in same directory with this wbsp file. Also create images of the digits 0 to 9 (name them 0.gif, 1.gif, 2.gif, ..., 9.gif) and place them in directory digits located in same directory with this wbsp file.
read more
Section [UserData]
This section contains a list of custom, user-defined variables that can be used in WBSP files, in form:
UserVariable=AnyValue
These variables can be read using functions $WBRV and $WBRRV.
The user-defined variables in UserData section can contain WhizBase tags and functions, same as any WBSP system variable (variables starting with WB_).
Here is an example of UserData section in default.inc file in virtual hosts document root:
some html code ...
Please send your comments/questions to
$wbrv[AdminEmail]
Thank you!
UserVariable=AnyValue
These variables can be read using functions $WBRV and $WBRRV.
The user-defined variables in UserData section can contain WhizBase tags and functions, same as any WBSP system variable (variables starting with WB_).
Here is an example of UserData section in default.inc file in virtual hosts document root:
[UserData]
AdminEmail=admin@somemailserver.com
MyMailServer=mail.somemailserver.com
Later these variables can be accessed from your WBSP files like this:AdminEmail=admin@somemailserver.com
MyMailServer=mail.somemailserver.com
[FormFields]
wb_mailserver=$wbrv{MyMailServer}
wb_bcc=$wbrv{AdminEmail}
Or like this:wb_mailserver=$wbrv{MyMailServer}
wb_bcc=$wbrv{AdminEmail}
some html code ...
Please send your comments/questions to
$wbrv[AdminEmail]
Thank you!
Subsection [Upload]
This subsection contains variables needed to control file upload using WBSP page. Using these variables, the developer can control where uploaded files will be saved, what is maximum size of a single file, what file types can not be uploaded, weather existing file will be overwritten or not, where to store log data and what prefix to add to URL of uploaded file. The variables that can be stored in this subsection are (in alphabetic order):
WB_UploadLog
Here's an example of upload subsection (marked with blue):
read more
WB_UploadLog
Here's an example of upload subsection (marked with blue):
[FormFields]
WB_BaseName=biblioA.mdb
WB_AllowMultipart=T
WB_Command=A
WB_UID=ISBN
WB_Redirect=titlesQ.wbsp
WB_RcdSet=Titles
[Upload]
WB_Disallow=![jpg,gif]
WB_UploadDir=images/
WB_Overwrite=T
WB_MaxFSize=24576
WB_UploadLog=upload.log
To learn more about uploading files using WBSP read the "Uploading files using WBSP" page.WB_BaseName=biblioA.mdb
WB_AllowMultipart=T
WB_Command=A
WB_UID=ISBN
WB_Redirect=titlesQ.wbsp
WB_RcdSet=Titles
[Upload]
WB_Disallow=![jpg,gif]
WB_UploadDir=images/
WB_Overwrite=T
WB_MaxFSize=24576
WB_UploadLog=upload.log
read more
Section [Referrer Check]
Section Referrer Check defines what commands will require validation of referring page and what domains will be accepted as valid referrers.
It has a variable Referrer that contains a comma-separated list of servers (domains) that will be accepted by WBSP engine as valid hosts for referring pages.
If this variable does not exist (or it is empty) then WBSP engine will not try to validate referrer. If you want to allow referring page to be located only on same server as WBSP file set this variable to $self$.
The main change from previous versions is that this section is part of the WBSP file while in previous versions it was part of WhizBase.ssc server-side configuration file.
Here is an example of Referrer check section:
It has a variable Referrer that contains a comma-separated list of servers (domains) that will be accepted by WBSP engine as valid hosts for referring pages.
If this variable does not exist (or it is empty) then WBSP engine will not try to validate referrer. If you want to allow referring page to be located only on same server as WBSP file set this variable to $self$.
The main change from previous versions is that this section is part of the WBSP file while in previous versions it was part of WhizBase.ssc server-side configuration file.
Here is an example of Referrer check section:
[Referrer Check]
Referrer=whizbase.com,wbsp.com
Referrer=whizbase.com,wbsp.com
Subscribe to:
Posts (Atom)