; ScriptBasic sample configuration file ; ; Note that this configuration file format is from v1.0b19 or later and has to be compiled ; to internal binary format before starting ScriptBasic ; this is the extension of the dynamic load libraries on this system dll ".dll" ; where the modules are to be loaded from module "c:\\scriptbasic\\modules\\" ; where to search system and module include files ; trailing / or \\ is needed include "c:\\scriptbasic\\include\\" ; this is where modules have to install their documentation docu "c:\\scriptbasic\\doc\\" ; the maximum number of includes that script basic processes ; this will stop the reading when the programmer makes error ; and includes files recursively. 1000 is the default value maxinclude 100 ; ; define preprocessors ; preproc ( ; define the debugger internal preprocessor internal ( dbg "c:\\scriptbasic\\modules\\dbg.dll" ) ; extensions that external preprocessors are to be applied on extensions ( ; here the key is the file name extension and the value is the symbolic name of the external preprocessor ; for example ; lsp "lisp" ; would say that all input that has the file name extension '.lsp' should be preprocessed using the external ; preprocessor named 'lisp'. The commad line to start this preprocessor has to be defined a few lines below ; saying: ; lisp ( ; executable "command line" ; directory "directory for the temporary files after preprocessing" ; ) ; Note that this is only an example, there is no 'lisp' preprocessor for ScriptBasic or at least I do not know any. ; heb "heb" ) ; the external preprocessors external ( heb ( executable "c:\\scriptbasic\\bin\\scriba.exe c:\\scriptbasic\\source\\heber.bas" directory "c:\\scriptbasic\\hebtemp\\" ) ) ) ; ; LIMIT VALUES TO STOP INIFINITE LOOP ; ; the maximal number of steps allowed for a program to run ; comment it out or set to zero to have no limit maxstep 0 ; the maximal number of steps allowed for a program to run ; inside a function. ; comment it out or set to zero to have no limit maxlocalstep 0 ; the maximal number of recursive function call deepness ; essentially this is the "stack" size maxlevel 3000 ; the maximal memory in bytes that a basic program is allowed to use ; for its variables maxmem 0 ; ; ScriptBasic loads the modules before starting the code ; in the order they are specified here ; ;preload "ext_trial" ; ; This is the directory where we store the compiled code ; to automatically avoid recompilation ; cache "c:\\scriptbasic\\cache\\" cgi ( ; ; These are the keys used by the CGI module ; debugfile "c:\\scriptbasic\\cgidebug.txt" ) ; ; berkeley db config ; bdb ( ; directories where to store the dir ( home "c:\\scriptbasic\\sampledb" ; the home directory of operation of the Berkerley DB data "db" ; database files log "log" ; log files temp "tmp" ; temporary files ) ; ScriptBasic extension modules can access only string configuration values ; therefore you have to specify these numbers within quotes (later versions will change it) ; limits ( ; lg_max "1024000" ; mp_mmapsize "0000" ; mp_size "000" ; tx_max "000" ; lk_max "000" ; ) ; what lock strategy to use ; it can be any of the followings ; default oldest random youngest lockstrategy default flags ( ; set the value to yes or no lock_default no init_lock yes init_log yes init_mpool yes init_txn yes create yes ) ) ; ; MySQL configuration ; mysql ( connections ( test ( ; the name of the connection host "127.0.0.1" ; the host for the connection db "test" ; database for the connection user "root" ; user for the connection password "" ; password for the connection port 0 ; the port to use socket "" ; the name of the socket or "" flag 0 ; the client flag clients 10 ; how many clients to serve before really closing the connections ) auth ( host "127.0.0.1" ; the host for the connection db "auth" ; database for the connection user "root" ; user for the connection password "" ; password for the connection port 0 ; the port to use socket "" ; the name of the socket or "" flag 0 ; the client flag clients 10 ; how many clients to serve before really closing the connections ) ) ) odbc ( connections ( test ( ; the name of the connection dsn "test" ; data source name user "" ; user for the connection, to test we use MS-Access thus there is no user or passwd password "" ; password for the connection ) ) ) ; ; This type of internal preprocessor was experimental and is not supported by ScriptBasic ; since build v1.0b26 ; Configure the sample preprocessor ; ; preproc$sample_uppercase "D:/MyProjects/sb/Debug/preproc.dll" ; ;break ; ; Configure the simple ScriptBasic httpd daemon ; ; Note that scripts may change the working directory therefore ; all directories should be specified here full path. For example ; the directory names here do not include the drive c: or e: ; because I develop it on two machines and it was inconvenient ; to alter and recompile the config file each time I moved the ; source to the other machine. When I run a script that changes ; the drive the http daemon stops in a few seconds because the ; guard thread do not find the pid file and therefore tells the ; engine to stop. ; servers ( threads 20 listenbacklog 30 port 8080 home "c:\\scriptbasic\\source\\examples\\" proxyip 0 ; set it true if you use Eszter engine behind Apache rewrite and proxy modules pid ( file "c:\\scriptbasic\\httpdlog\\pid.txt" delay 10 ; number of seconds to sleep between the examination of the pid file if that still exists wait ( period 10 ; number of times to wait for the threads to stop before forcefully exiting length 1 ; number of seconds to wait for the threads to stop (total wait= period*length) ) ) vdirs ( dir "/user/:c:\\scriptbasic\\source\\examples\\user\\" dir "/cgi-bin/:c:\\scriptbasic\\source\\examples\\cgi-bin\\" dir "/sibawa/:c:\\scriptbasic\\source\\examples\\sibawa\\cgi-bin\\" ) client ( allowed "127.0.0.1/255.255.255.255" allowed "16.94.58.4/0.0.0.0" ; denied "127.0.0.1/0.0.0.0" ; denied "16.192.68.5/255.255.0.0" ) run ( ; start "c:\\scriptbasic\\source\\examples\\runstart.bas" ; start the program in an asynchronous thread start "c:\\scriptbasic\\source\\examples\\sibawa\\sibawastart.bas" ; restart "c:\\scriptbasic\\source\\examples\\runrestart.bas" ; same as start, but when the program terminates start it again ) errmsgdest 3 nolog 0 ; set this true not to use logs or ignore erroneouslog configuration log ( panic ( file "c:\\scriptbasic\\httpdlog\\panic.log" ) app ( file "c:\\scriptbasic\\httpdlog\\app.log" ) err ( file "c:\\scriptbasic\\httpdlog\\err.log" ) hit ( file "c:\\scriptbasic\\httpdlog\\hit.log" ) stat ( file "c:\\scriptbasic\\httpdlog\\stat.log" ) ) ; the error page when a page is not found msg404 """ Error 404 page not found

Page not found

We regretfully inform you that the page you have requested can not be found on this server.

In case you are sure that this is a server configuration error, please contact root@localhost """ code404 "200 OK" ; the http error code for page not found. The default is 404 ; the program to run when a page is not found ;run404 "c:\\scriptbasic\\source\\examples\\run404.bas" mt ( sleep 55 ) )