@conf[filespec] $confdir[^file:dirname[$filespec]] $charsetsdir[/usr/local/etc/parser3.charsets] $sqldriversdir[/usr/local/lib/parser3] $CHARSETS[ # $.koi8-r[$charsetsdir/koi8-r.cfg] # $.windows-1250[$charsetsdir/windows-1250.cfg] $.windows-1251[$charsetsdir/windows-1251.cfg] # $.windows-1257[$charsetsdir/windows-1257.cfg] ] #change your client libraries paths to those on your system $SQL[ $.drivers[^table::create{protocol driver client mysql $sqldriversdir/libparser3mysql.so $sqldriversdir/../mysql/libmysqlclient.so pgsql $sqldriversdir/libparser3pgsql.so $sqldriversdir/../libpq.so sqlite $sqldriversdir/libparser3sqlite.so -configure could not guess- }] ] #for ^file::load[name;user-name] mime-type autodetection $MIME-TYPES[^table::create{ext mime-type zip application/zip doc application/msword xls application/vnd.ms-excel pdf application/pdf ppt application/powerpoint rtf application/rtf gif image/gif jpg image/jpeg jpeg image/jpeg png image/png tif image/tiff html text/html htm text/html txt text/plain xml text/xml mts application/metastream mid audio/midi midi audio/midi mp3 audio/mpeg ram audio/x-pn-realaudio rpm audio/x-pn-realaudio-plugin ra audio/x-realaudio wav audio/x-wav au audio/basic mpg video/mpeg avi video/x-msvideo mov video/quicktime swf application/x-shockwave-flash }] $LIMITS[ $.post_max_size(10*0x400*0x400) ] #$MAIL[ # $.sendmail[your sendmail command goes here] # these are tried when no 'sendmail' specified: # /usr/sbin/sendmail -t -i -f postmaster # /usr/lib/sendmail -t -i -f postmaster #] @fatal_error[title;subtitle;body] $response:status(500) $response:content-type[ $.value[text/html] $.charset[$response:charset] ] $title

^if(def $subtitle){$subtitle;$title}

$body #for [x] MSIE friendly ^for[i](0;512/8){} @unhandled_exception_debug[exception;stack] ^fatal_error[Unhandled Exception^if(def $exception.type){ ($exception.type)};$exception.source;
^untaint[html]{$exception.comment}
^if(def $exception.file){ ^untaint[html]{$exception.file^(${exception.lineno}:$exception.colno^)} } ^if($stack){
^stack.menu{ }
$stack.name$stack.file^(${stack.lineno}:$stack.colno^)
} ] @unhandled_exception_release[exception;stack] ^fatal_error[Unhandled Exception;;

The server encountered an unhandled exception and was unable to complete your request.

Please contact the server administrator, $env:SERVER_ADMIN and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the Parser error log or in debug version of unhandled_exception.

] @is_developer[] #change mask to your ip address $result(def $env:REMOTE_ADDR && ^env:REMOTE_ADDR.match[^^127\.0\.0\.1^$]) @unhandled_exception[exception;stack] #developer? use debug version to see problem details ^if(^is_developer[]){ ^unhandled_exception_debug[$exception;$stack] }{ ^if($exception.type eq "file.missing"){ # ^log404[] # ^location[/404/] $response:status(404) }{ ^unhandled_exception_release[$exception;$stack] } } @auto[] #source/client charsets $request:charset[windows-1251] $response:charset[windows-1251] $response:content-type[ $.value[text/html] $.charset[$response:charset] ] #For MySQL $SQL.connect-string[mysql://user:pass@host/db] #For PostgreSQL #$SQL.connect-string[pgsql://user:pass@host/db] #For sqlite #$SQL.connect-string[sqlite://db]