Configuration method

If configuration file contains method conf, this method will be executed first, before method auto, to set vital system parameters:
·Files defining character sets;  
·HTTP POST-request size limit;  
·file size limit   [3.4.5];  
· ñount of loops iterations and recoursion depth limit   [3.4.5];
·Mail-sending server/application;  
·SQL-drivers and their parameters;  
·Table to associate filename extension with its mime-type.  

We recommend that you place this method in in configuration file.

Method is defined like the following:

filespec is full name of file containing the method.

UTF-8, used in Parser by default, is always available and thus doesn't have to be loaded. To use other charsets, specify files defining them. This should be done in the following way:

See "Files defining character sets".

#Size limit for POST data, default is 10Mb:
#Size limit for files to be read into memory, default is 512Mb:
#Loops iterations limit, default is 20000:
#Recoursion depth limit, default is 1000:
#File lock wait timeout for reading or writing, default is 9.5 seconds:

max_file_size, max_loop, max_recoursion to zero value means 'unlimited'.

Parameters for mail-sending program (see

…under Windows and UNIX-SMTP-server address


…under UNIX:

in safe mode versions you can configure mail-sending program only if you compile Parser from source code, by yourself. Binary versions, which are available for download directly from, configure mail-sending in such a way:

   /usr/sbin/sendmail -i -t -f postmaster

It is only in unsafe-mode versions that you can specify mail-sending program by yourself:
   $.sendmail[/custom/mail/sending/program params]

…and by default Parser uses command…

   /usr/sbin/sendmail -t -i -f postmaster

…or command…

   /usr/lib/sendmail -t -i -f postmaster

…depending on system you use.

When a message is being sent, Parser will replace "
postmaster" with mail-sender's address from obligatory header field "from".

One can also provide a table of SQL-drivers:
[^table::create{protocol   driver   client
mysql   /full/disk/path/parser3mysql.dll   /full/disk/path/libmySQL.dll
odbc   /full/disk/path/parser3odbc.dll
pgsql /full/disk/path/parser3pgsql.dll   /full/disk/path/libpq.dll
sqlite /full/disk/path/parser3sqlite.dll   /full/disk/path/sqlite3.dll
oracle   /path/to/parser3oracle.dll   C:\Oracle\Ora81\BIN\oci.dll?PATH+=^;C:\Oracle\Ora81\bin
Column client of table drivers may contain parameters passed to client's library, delimited from file name with character ?. The whole construction will look like:
…as well as…
These variables will replace (=) or be appended to (+=) already existing value in program environment before the library is initialized. Such an approach is particularly useful when you add path to Oracle libraries, if this path has not been already specified in program's system environment.

Table to associate filename extension with its mime-type:

 file created with ^file::load[…],
 will specify this $response:content-type when output in $response:body
table::create{ext mime-type
7z   application/x-7z-compressed
au   audio/basic
avi   video/x-msvideo
css   text/css
cvs   text/csv
doc   application/msword
docx   application/vnd.openxmlformats-officedocument.wordprocessingml.document
dtd   application/xml-dtd
gif   image/gif
gz   application/x-gzip
htm   text/html
html   text/html
ico   image/x-icon
jpeg   image/jpeg
jpg   image/jpeg
js   application/javascript
json   application/json
log   text/plain
mid   audio/midi
midi   audio/midi
mov   video/quicktime
mp3   audio/mpeg
mpg   video/mpeg
mpeg   video/mpeg
mts   application/metastream
pdf   application/pdf
png   image/png
ppt   application/powerpoint
ra   audio/x-realaudio
ram   audio/x-pn-realaudio
rar   application/x-rar-compressed
rdf   application/rdf+xml
rpm   audio/x-pn-realaudio-plugin
rss   application/rss+xml
rtf   application/rtf
svg   image/svg+xml
swf   application/x-shockwave-flash
tar   application/x-tar
tgz   application/x-gzip
tif   image/tiff
txt   text/plain
wav   audio/x-wav
xls   application/
xlsx   application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xml   text/xml
xsl   text/xml
zip   application/zip

File name extensions in this table should be given in lowercase. Table search is case-insensitive, so, for example, file FACE.GIF will acquire mime-type image/gif.

$STRICT-VARS(true) is specified every attempt to access to uninitialized variable will cause an exception.   [3.4.2]

Copyright © 1997–2017 Art. Lebedev Studio | Last updated: 20.04.2017