Goto main content

configuration

Configuration file for extenso.

CONFIGURATION

NAME

configuration - Configuration file for extenso.

SYNOPSIS

See Description

DESCRIPTION

Configuration file is used to initialise the program:

#
# Project name
#

Project : "v5"                                             # Name of project
WebsiteRoot : "/usr/local/website/v5"                      # Root of project
Locale : "fr_CA.utf8"                                      # Locale used in program
Postmax : "64000"                                          # Maximum number of bytes for a post

#
# Database connection
#

Database default {
        Host : "localhost"                                     # Server name
        Name : "v5"
        User : "v5"
        Password : "v5"
}

#
# List of modules
#

Module exemple {
        Library : "/usr/local/lib/libsnexemple.so"
        Init : "snexemple_init"
}


Module oauth {
        Library : "/usr/local/lib/libsnoauth.so"
        Init : "snoauth_init"
}

Module curl {
        Library : "/usr/local/lib/libsncurl.so"
        Init : "sncurl_init"
}

# Timeout in second for the request If no timeout is specified, the default value is zero which mean no timeout at all.

Timeout : "5"

#
# Preload these functions
#

Preload : "/usr/local/website/v5/permission.snc"

#
# Index file
#

Index : "index.sn"

esc_cgidata : "false"

# Timeout for a request

Timeout : "5"

The preload is used to tell apache to preload this executable file.

When a file is request by apache, this code is executed. An example:

Results:
{{
a = request();
ext = extention(a.filename);
"ext"; ext;
if ext ne "sn" && ext ne "snc" then
        "set status to -1";
        status(-1);
else
        "set status to 0";
        status(0);
endif
}}

In this case, if the extention of the file is sn or snc, the file will be parse by extenso. If not -1 is return which is the apache status DECLINED. The output of the execution is sent to error_log for debugging purpose.

PARAMETERS

esc_cgidata
If this parameter is set to "true", than all parameters when cgidata is called will be escape. 
< will be replace by &lt;, > will be replace by &gt; and & will be replace by &amp; Also, the original value
of a paramerer (without escaping) will be put in the name of the parameter prefix by sn_. So if the parameter is call test than cgidata.test will contain the escape value sn sn_test
will contain the original value. This parameter if valid from version 5.48 of sncode. This configuration can be overide in the function cgidata.
timeout
timeout in second before the request is stop.

SEE ALSO

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

1.1 2016-03-08 laplante@sednove.com Add parameter esc_cgidata and timeout

Edit

© 2024 extenso Inc. All rights reserved.