Annotation of parser3/bin/auto.p.dist.in, revision 1.12

1.12    ! paf         1: #$Id: auto.p.dist.in,v 1.11.14.1 2005/08/08 13:45:12 paf Exp $
1.1       paf         2: 
1.11      paf         3: @conf[filespec]
                      4: $confdir[^file:dirname[$filespec]]
                      5: $charsetsdir[$confdir/charsets]
                      6: $sqldriversdir[$confdir/lib]
1.1       paf         7: 
                      8: $CHARSETS[
                      9: @commentcharset_koi8r@    $.koi8-r[$charsetsdir/koi8-r.cfg]
                     10: @commentcharset_windows1250@    $.windows-1250[$charsetsdir/windows-1250.cfg]
                     11: @commentcharset_windows1251@    $.windows-1251[$charsetsdir/windows-1251.cfg]
                     12: @commentcharset_windows1257@    $.windows-1257[$charsetsdir/windows-1257.cfg]
                     13: ]
1.9       paf        14: #change your client libraries paths to those on your system
1.1       paf        15: $SQL[
                     16:        $.drivers[^table::set{protocol  driver  client
1.8       paf        17: mysql  $sqldriversdir/libparser3mysql.@dll_extension@  @mysql_client@
                     18: pgsql  $sqldriversdir/libparser3pgsql.@dll_extension@  @pgsql_client@
                     19: oracle $sqldriversdir/libparser3oracle.@dll_extension@ @oracle_client@
1.1       paf        20: }]
                     21: ]
                     22: 
                     23: #for ^file:load[name;user-name] mime-type autodetection
                     24: $MIME-TYPES[^table::set{ext    mime-type
                     25: zip    application/zip
                     26: doc    application/msword
                     27: xls    application/vnd.ms-excel
                     28: pdf    application/pdf
                     29: ppt    application/powerpoint
                     30: rtf    application/rtf
                     31: gif    image/gif
                     32: jpg    image/jpeg
1.4       paf        33: jpeg   image/jpeg
1.1       paf        34: png    image/png
                     35: tif    image/tiff
                     36: html   text/html
                     37: htm    text/html
                     38: txt    text/plain
1.7       paf        39: xml    text/xml
1.1       paf        40: mts    application/metastream
                     41: mid    audio/midi
                     42: midi   audio/midi
                     43: mp3    audio/mpeg
                     44: ram    audio/x-pn-realaudio
                     45: rpm    audio/x-pn-realaudio-plugin
                     46: ra     audio/x-realaudio
                     47: wav    audio/x-wav
                     48: au     audio/basic
                     49: mpg    video/mpeg
                     50: avi    video/x-msvideo
                     51: mov    video/quicktime
                     52: swf    application/x-shockwave-flash
                     53: }]
                     54: 
                     55: $LIMITS[
                     56:        $.post_max_size(10*0x400*0x400)
                     57: ]      
                     58: 
                     59: #$MAIL[
                     60: #      $.sendmail[your sendmail command goes here]
                     61: #      these are tried when no 'sendmail' specified:
1.5       paf        62: #          /usr/sbin/sendmail -t -i -f postmaster
                     63: #          /usr/lib/sendmail -t -i -f postmaster
1.1       paf        64: #]
                     65: 
1.10      paf        66: @fatal_error[title;subtitle;body]
1.6       paf        67: $response:status(500)
                     68: $response:content-type[
                     69:         $.value[text/html]
                     70:         $.charset[$response:charset]
1.1       paf        71: ]
1.6       paf        72: <html>
                     73: <head><title>$title</title></head>
                     74: <body>
1.10      paf        75: <h1>^if(def $subtitle){$subtitle;$title}</h1>
1.6       paf        76: $body
                     77: #for [x] MSIE friendly
                     78: ^for[i](0;512/8){<!-- -->}
                     79: </body>
1.10      paf        80: </html>
1.1       paf        81: 
1.3       paf        82: @unhandled_exception_debug[exception;stack]
1.10      paf        83: ^fatal_error[Unhandled Exception^if(def $exception.type){ ($exception.type)};$exception.source;
1.1       paf        84: <pre>^untaint[html]{$exception.comment}</pre>
1.10      paf        85: ^if(def $exception.file){
                     86: ^untaint[html]{<tt>$exception.file^(${exception.lineno}:$exception.colno^)</tt>}
1.1       paf        87: }
                     88: ^if($stack){
1.10      paf        89:        <hr/>
                     90:        <table>
1.1       paf        91:        ^stack.menu{
1.10      paf        92:                <tr><td>$stack.name</td><td><tt>$stack.file^(${stack.lineno}:$stack.colno^)</tt></td></tr>
1.1       paf        93:        }
1.10      paf        94:        </table>
1.1       paf        95: }
1.3       paf        96: ]
                     97: 
1.6       paf        98: @unhandled_exception_release[exception;stack]
1.10      paf        99: ^fatal_error[Unhandled Exception;;
1.6       paf       100: 
                    101: <p>The server encountered an unhandled exception 
                    102: and was unable to complete your request.</p>
                    103: <p>Please contact the server administrator, $env:SERVER_ADMIN
                    104: and inform them of the time the error occurred, 
                    105: and anything you might have done that may have caused the error.</p>
                    106: <p>More information about this error may be available in the Parser error log
                    107: or in debug version of unhandled_exception.</p>
                    108: 
1.3       paf       109: ]
1.6       paf       110: 
1.12    ! paf       111: @is_developer[]
        !           112: #change mask to your ip address
        !           113: $result(^env:REMOTE_ADDR.match[^^127\.0\.0\.1$])
        !           114: 
1.6       paf       115: @unhandled_exception[exception;stack]
1.12    ! paf       116: #developer? use debug version to see problem details
        !           117: ^if(^is_developer[])
        !           118:         ^unhandled_exception_debug[$exception;$stack]
        !           119: }{
        !           120:         ^if($exception.type eq "file.missing"){
        !           121: #                ^log404[]
        !           122:                 ^location[/404/]
        !           123:         }{
        !           124:                 ^unhandled_exception_release[$exception;$stack]
        !           125:         }
        !           126: }
1.6       paf       127: 
1.1       paf       128: 
                    129: @auto[]
                    130: #source/client charsets
                    131: $request:charset[windows-1251]
                    132: $response:charset[windows-1251]
                    133: 
                    134: $response:content-type[
                    135:         $.value[text/html]
                    136:         $.charset[$response:charset]
                    137: ]
                    138: 
                    139: #$SQL.connect-string[mysql://user:pass@host/db?charset=cp1251_koi8]
                    140: #$SQL.connect-string[pgsql://user:pass@host/db]
                    141: #$SQL.connect-string[oracle://user:pass@service?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                    142: #$SQL.connect-string[odbc://DSN=datasource^;UID=user^;PWD=password]

E-mail: