Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Rivet?V=96
QUERY_STRINGV=96
CONTENT_TYPE
DOCUMENT_URI/revision/Rivet
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.69.6.46
REMOTE_PORT47972
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.19.30.232
HTTP_CF_RAY87c29133793661fe-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_CF_CONNECTING_IP3.19.30.232
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit Rivet \[http://tcl.apache.org/rivet/Rivetlogo_small.png\]\n\n\[Apache\]\ Rivet\ is\ the\ next\ generation\ of\ \[mod_dtcl\]\ and\ \[NeoWebScript\],\ combined:\n\"like\ \[PHP\],\ but\ with\ \[Tcl\].\"\ \ More\ info\ appears\ at\ http://tcl.apache.org/rivet/\n\nWas\ this\ made\ by\ the\ same\ people\ as\ NWS\ and\ mod_dtcl,\ or\ is\ it\ a\ separate\ team\ of\ developers?\ \ -\[FW\]\n\nCurrent\ developers\ on\ Rivet\ are\ \[Massimo\ Manghi\],\ \[Harald\ Oehlmann\],\ \[Karl\ Lehenbauer\]\ and\ sometimes\ \[David\ Welton\].\ \ \[Damon\ Courtney\],\ \[Brad\ Morrison\],\ \[Pat\ Thoyts\]\ and\ \[Andy\ Doerr\]\ have\ all\ greatly\ contributed\ in\ the\ past.\n\nThere\ is\ a\ Windows\ binary\ version\ for\ Apache\ (not\ Apache2)\ here:\ http://www.apache.mirrors.versehost.com/tcl/rivet/binary/\n\nhttp://tcl.apache.org/rivet/static/rn-2-1.html%|%Rivet\ 2.1.4%|%\ released.\ \n\nUbuntu\ has\ Rivet\ in\ its\ repositories\ but\ it\ might\ be\ necessary\ to\ change\ mpm-event\ to\ mpm-prefork\ in\ apache\ config\ (mods\ enabled)\n\n----\nTry\ \[THP\]\ as\ an\ alternative.\ \ A\ webserver\ neutral\ way\ to\ embed\ Tcl\ code.\ --\[CAU\]\n\n----\nCan\ we\ have\ some\ testimonials\ by\ Rivet\ users?\ \ (sorry,\ i'm\ new\ to\ servers\ in\ general)\n\n\ \ \ 1.\ how\ do\ you\ connect\ to\ a\ db,\ tcl\ db\ extensions?\n\ \ \ 2.\ is\ an\ apache\ instance\ with\ rivet\ and\ tomcat\ possible?\ encouraged?\n\ \ \ 3.\ mod_rewrite\ in\ the\ midst\ of\ all\ this,\ or\ is\ that\ only\ available\ on\ top\ of\ a\ tomcat\ instance?\n\ \ \ 4.\ are\ importing\ libraries\ like\ \[tcllib\]\ a\ piece\ of\ cake\ after\ rivets\ installed?\n\n\ni\ want\ to\ run\ a\ dual\ \[java\]/tcl\ environment...\n\n----\n\[davidw\]\ -\ I\ think\ these\ questions\ are\ more\ appropriate\ for\ the\ newsgroup\ or\ the\ rivet\ mailing\ list,\ but\ I'll\ give\ it\ a\ shot:\n\n1)\ You\ use\ regular\ Tcl\ database\ extensions.\ \ Rivet\ is\ pretty\ much\ standard\ Tcl,\ making\ a\ lot\ of\ the\ code\ you\ write\ for\ it\ reusable\ on\ or\ off\ the\ web.\n\n2)\ I've\ never\ mixed\ Apache\ and\ Tomcat.\ \ I\ don't\ really\ care\ for\ Java\ for\ these\ sorts\ of\ things\ unless\ you\ have\ a\ *big*\ infrastructure,\ and\ that's\ not\ something\ I've\ dealt\ with\ a\ lot.\n\n3)\ mod_rewrite\ is\ an\ Apache\ thing\ and\ it\ works\ just\ fine\ with\ Rivet.\ \ In\ fact,\ it's\ encouraged\ if\ you\ want\ to\ do\ things\ like\ have\ one\ rivet\ script\ respond\ to\ a\ whole\ virtual\ directory\ tree.\ \ So\ /foo/bar/\ /foo/baz/\ /foo/bee/bop\ and\ so\ forth\ are\ all\ mapped\ to\ foo.tcl?bar\ foo.tcl?baz\ foo?bee+bop\ and\ so\ forth.\n\n4)\ tcllib\ and\ other\ libs\ are\ a\ piece\ of\ cake:-)\n\n----\nAbout\ Rivet's\ mailing\ list,\ \[http://tcl.apache.org/rivet/about.rvt\]\ says:\ \"This\ list\ is\ archived\ here:\ \[http://mail-archives.apache.org/eyebrowse/SummarizeList?listId=118\]\".\ But\ leads\ to\ an\ error:\ \"Required\ parameter\ 'listId'\ or\ 'listName'\ is\ missing\ or\ invalid\".\n\n\[JJR\]:\ The\ mailing\ list\ archives\ for\ the\ tcl\ apache\ projects\ can\ be\ found\ at\ \[http://mail-archives.apache.org/mod_mbox/#tcl\]\ .\n\n----\nRivet\ \"lets\ you\ program\ in\ not\ only\ mixed\ HTML/Tcl,\ but\ also\ pure\ Tcl,\ which\nis\ good\ for\ separating\ content\ and\ presentation.\"\n\n----\n\[RLH\]:\ Are\ there\ any\ Rivet\ tutorials\ mucking\ about?\n\n\[Massimo\ Manghi\]:\ Rivet\ manuals\ have\ examples\ for\ both\ configuration\ and\ programming.\ Rivet\ extends\ Tcl\ with\ a\ small\ set\ of\ new\ commands\ dedicated\ to\ web\ programming\ and\ therefore\ having\ a\ good\ Tcl\ manual\ can\ be\ useful,\ depending\ on\ the\ familiarity\ of\ the\ developer\ with\ the\ language.\n\n----\n\[davidw\]:\ Not\ yet,\ but\ Rivet\ is\ very\ similar\ to\ plain\ old\ Tcl,\ and\ the\ differences\ are\ covered\ in\ the\ documentation.\n\nAs\ far\ as\ programming\ style,\ if\ you\ are\ doing\ something\ simple...\ just\ go\ ahead\ and\ mix\ your\ HTML\ and\ Tcl\ code.\ \ If\ it's\ a\ more\ complex\ app,\ separate\ things\ out\ into\ .tcl\ files\ that\ act\ as\ the\ logic\ and\ use\ .rvt\ files\ simply\ as\ templates.\n\nOr\ write\ the\ mailing\ list\ for\ more\ specific\ questions...\n\n\[RLH\]:\ I\ am\ looking\ for\ something\ similiar\ to\ HTML::Template\ \[http://html-template.sourceforge.net/article.html\]\ from\ the\ Perl\ side\ of\ the\ house.\ I\ like\ the\ clean\ separation\ of\ code\ and\ HTML.\ \ :\ )\n\n----\nThat\ perl\ template\ stuff\ just\ adds\ funny\ tags,\ which\ are\ not\ standard\ HTML.\ \ If\ you\ want\ to\ separate\ code\ and\ templates,\ do\ your\ processing\ in\ a\ .tcl\ file,\ then\ do\ \"parse\ foo.rvt\",\ and\ in\ the\ .rvt\ file,\ put\ statements\ like\ <?\ puts\ \$foo\ ?>\ <?\ puts\ \$bar?>\ where\ you\ need\ variable\ values.\ \ Or\ if\ you\ really\ wanted\ to\ do\ something\ fancy,\ you\ could\ call\ the\ parse.rvt\ in\ its\ own\ namespace/interpreter/whatever\ from\ the\ .tcl\ file,\ and\ create\ procs\ that\ are\ aliases\ to\ your\ variables,\ so\ all\ you\ have\ to\ do\ is\ <?foo?>\ <?bar?>\ in\ order\ to\ get\ output.\ \ I\ suppose\ a\ standardized\ way\ of\ doing\ this\ would\ be\ nice,\ but\ it\ is\ pretty\ easy...\ experiment\ and\ tell\ us\ (on\ the\ list,\ please)\ what\ you\ end\ up\ liking!\n\n\[RLH\]:\ You\ are\ correct\ about\ the\ funny\ tags,\ I\ meant\ more\ of\ a\ \"standard\ way\ of\ doing\ this...\"\ as\ you\ said.\ I\ will\ go\ with\ your\ suggestions.\ I\ am\ far\ from\ good\ enough\ to\ create\ the\ \"standard\ way\"\ though.\ \ :\ )\n\n----\n\[RLH\]\ 2006-02-07:\ Are\ there\ any\ hosting\ companies\ that\ support\ Rivet?\n\n\[Roy\ Keene\]\ 2008-10-06:\ Any\ Rivet\ application\ can\ be\ turned\ into\ an\ HTTP/CGI\ application.\ \ And\ with\ Starpacks\ the\ entire\ thing\ can\ be\ completely\ self-contained\ in\ one\ file.\n\n----\n\[APW\]\ 2007-01-20:\ if\ you\ have\ problems\ installing\ \[Tcl\ and\ Rivet\ on\ Windows\]\ follow\ the\ link.\n\n----\n\[Roy\ Keene\]\ 2008-10-05:\ Rivet\ can\ also\ be\ implemented\ transparently\ using\ CGI.\ \ This\ has\ the\ advantage\ of\ using\ \"suEXEC\"\ and\ working\ well\ with\ all\ versions\ of\ Apache.\ More\ information\ can\ be\ found\ on\ the\ Rivet/CGI\ page\ (\[http://www.rkeene.org/projects/info/wiki/51\])\n\n\[Roy\ Keene\]\ 2009-03-20:\ Rivet/CGI\ (\[http://www.rkeene.org/projects/info/wiki/51\])\ now\ supports\ converting\ a\ Rivet\ application\ into\ a\ Starkit\ (which\ can\ be\ turned\ into\ a\ Starpack)\n\n----\n\[PWQ\]\ 2011-09-27:\ See\ \[Rivet\ -\ OpenBsd\ 4.9\]\ for\ installation\ notes\ on\ OpenBSD.\n\n----\n2012-07-07:\ \[Massimo\ Manghi\]\ gave\ a\ speech\ on\ \[http://www.eurotcl.tcl3d.org/program.html%|%EuroTCL%|%\].\nThe\ \[http://www.eurotcl.tcl3d.org/eurotcl-2012/presentations/11-Manghi-Rivet.odp%|%slides%|%\]\ gave\ a\ good\ overview\ of\ current\ Rivet\ capabilities.\n\n----\n<<discussion>>\ Apache\ start\ error:\ can\ not\ locate\ tcllib8.5.so\ (Unix)\n\[HaO\]\ 2012-05-04:\ Rivet\ loads\ the\ tcl\ library\ using\ the\ dynamic\ linker.\n\nThus,\ it\ must\ be:\n\n\ \ \ *\ in\ the\ default\ location\ ''/usr/lib(64)''\n\ \ \ *\ or\ in\ a\ folder\ listed\ in\ the\ environment\ variable\ ''LD_LIBRARY_PATH''\ of\ apache.\n\n\nI\ felt\ it\ easier\ to\ add\ a\ symlink\ to\ ''/usr/lib(64)''\ instead\ setting\ a\ custom\ library\ path.Commands\ necessary,\ if\ tcl\ is\ installed\ in\ ''/usr/local/lib'':\n======none\n#\ cd\ /usr/lib(64)\n#\ ln\ -s\ /usr/local/lib(64)/libtcl8.5.so\n======\n<<discussion>>\n\n<<discussion>>\ Apache\ start\ error:\ undefined\ symbol:\ xxx\n\[HaO\]\ 2012-05-04:\ I\ got\ the\ following\ error\ starting\ apache:\n\n''Can't\ locate\ API\ module\ structure\ `mod_rivet'\ in\ file\ /etc/httpd/modules/mod_rivet.so:\ /etc/httpd/modules/mod_rivet.so:\ undefined\ symbol:\ mod_rivet''\n\nThis\ was\ due\ to\ the\ following\ line\ in\ the\ apache\ config\ file:\n\n======none\nLoadModule\ mod_rivet\ /etc/httpd/modules/mod_rivet.so\n======\n\nThe\ second\ word\ ''mod_rivet''\ was\ incorrect\ and\ its\ value\ is\ shown\ in\ the\ error\ message.\nThe\ correct\ value\ is:\ ''rivet_module''\n\n======none\nLoadModule\ rivet_module\ /etc/httpd/modules/mod_rivet.so\n======\n\n<<discussion>>\n\n<<discussion>>\ error\ return\ page\n\n\n***\ George\ Petasis\ asked\ about\ the\ default\ error\ return\ page:\ ***\n***George\ Petasis\ asked\ about\ the\ default\ error\ return\ page:***\nreturn\ an\ error\ page?\nI\ have\ tried\ \"headers\ numeric\ 500\".\ Firefox\ sees\ that\ the\ server\ \nresponded\ with\ an\ internal\ server\ error,\ but\ I\ see\ a\ blank\ page.\nHow\ can\ I\ use\ the\ apache\ default\ error\ page?\n\n***\ Massimo\ Manghi\ answered:\ ***\n\n***Massimo\ Manghi\ answered:***\n\nA\ tcl\ error\ can\ be\ handled\ setting\ up\ an\ ErrorScript.\ If\ the\ error\ is\ raised\ by\ an\ abnormal\ condition\ you\ are\ catching\ somehow\ in\ your\ code\ you\ may\ call\ 'abort_page\ <abort_code>'\ which\ will\ trigger\ the\ code\ set\ up\ in\ AbortScript.\ Within\ this\ script\ you\ can\ check\ which\ condition\ brought\ about\ the\ error\ using\ the\ 'abort_code'\ command\ that\ is\ supposed\ to\ return\ the\ <abort_code>\ you\ passed\ when\ you\ fired\ the\ exception.\n\nSee\ also\ the\ 'headers'\ and\ 'no_body'\ commands\n\nSurely\ you\ can\ design\ your\ own\ error\ page\ if\ you\ want.\ It\ should\ imply\ some\ extra\ work\ but\ greater\ flexibility\n\nDid\ you\ check\ this\ page\ about\ error\ customization\ in\ Apache?\n\nhttp://httpd.apache.org/docs/2.0/custom-error.html\n\n***\ George\ Petasis\ asked\ how\ to\ use\ the\ standard\ Apache\ error\ page\ ***\n\n***George\ Petasis\ asked\ how\ to\ use\ the\ standard\ Apache\ error\ page***\nIs\ this\ possible?\ \n\n***\ Massimo\ answered\ that\ this\ is\ propably\ not\ possible\ ***\n\n***Massimo\ answered\ that\ this\ is\ propably\ not\ possible***\n\nApache\ will\ certainly\ return\ its\ standard\ error\ messages\ when\ an\ internal\ abnormal\ condition\ occur\ that\ cannot\ be\ handled\ by\ Rivet.\nMore\ questions\ come\ up\ to\ my\ mind\ related\ to\ the\ error\ handling\ and\ Rivet\ interaction\ with\ other\ Apache\ components.\n\n***\ Harald\ Oehlmann\ wrote,\ why\ you\ need\ your\ own\ error\ page\ ***\n\n***Harald\ Oehlmann\ wrote,\ why\ you\ need\ your\ own\ error\ page***\nWhy\ ?\ It\ depends\ on\ the\ requested\ format.\nI\ follow\ the\ book\ \"RESTful\ Web\ Services\ Cookbook\"\ by\ Subbu\ Allamaraju.\nHalf\ the\ book\ is\ about\ \"error\ return\"...\n\nMy\ example:\n\n\nA\ data\ base\ is\ queried\ and\ there\ are\ the\ following\ formats\ available:\n\n\ \ \ *\ web\ (pretty\ web\ page)\n\ \ \ *\ http\ table\n\n\ \ \ *\ xml\ table\n\ \ \ *\ csv\ table\n\nFirst,\ I\ find\ out\ the\ required\ destination\ format:\n\ \ \ *\ A\ form\ variable\n\ \ \ *\ if\ not\ given:\ headers(Accept)\n\ \ \ \ \ ->\ there\ is\ a\ new\ method\ in\ 2.0.5\ to\ easily\ parse\ this\n\nThen\ I\ look\ into\ the\ data\ base.\nIf\ the\ required\ data\ is\ not\ found\ or\ there\ is\ another\ error,\ I\ output\nerror\ pages\ depending\ on\ the\ required\ format\ and\ the\ set\ http\ status.\nSee\ also,\ that\ I\ flag\ \"not\ found\ data\"\ as\ cacheable,\ but\ server\ errors\nas\ not\ \;-)\n\n======\nif\ \{\[catch\ \{\n\ \ \ \ set\ resultData\ \[wwwbaseProductDataGet\\\n\ \ \ \ if\ \{\[catch\ \{\n\ \ \ \ \ \ \ \ set\ resultData\ \[wwwbaseProductDataGet\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[env\ REMOTE_ADDR\]\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[var\ get\ log\]\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(key)\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"\"\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(country)\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(language)\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(date)\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(format)\]\n\ \ \ \ \}\ Err\ dErr\]\}\ \{\n\ \ \ \ \ \ \ \ switch\ -exact\ --\ \[dict\ get\ \$dErr\ -errorcode\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ PARAM\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ >\ Return\ 400\ Bad\ request\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ wwwbaseCacheSet\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ numeric\ 400\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ NOT_FOUND\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ >\ Return\ 404\ Not\ found\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ wwwbaseCacheSet\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ numeric\ 404\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ default\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ >\ Return\ 500\ Internal\ server\ error\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ wwwbaseCacheSet\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ numeric\ 500\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ #\ >\ Return\ 404\ Not\ found\n\ \ \ \ \ \ \ \ switch\ -exact\ --\ \$response(format)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ csv\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"Error\\n\$Err\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ json\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\\\{error:\ \\\"\$Err\\\"\\\}\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ xml\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"<error>\$Err</error>\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ html\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"<html><head><title>\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[mce\ PageTitleProductRequest\]</title>\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <body><h1>\[mce\ ErrSearch\ \$Err\]</h1></body>\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ form\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ switch\ -exact\ --\ \[dict\ get\ \$dErr\ -errorcode\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ PARAM\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \[mce\ ErrParam\ \$Err\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NOT_FOUND\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \[mce\ ErrSearch\ \$Err\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \[mce\ ErrServer\ \$Err\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \[mce\ ErrSearch\ \$Err\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ puts\ \$Err<br/>\[string\ map\ \{\\n\ <br/>\}\ \$::errorInfo\]\n\ \ \ \ \ \ \ \ \}\n\}\ else\ \{\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ #\ >\ Correct\ response\ is\ cacheable\n\ \ \ \ \ \ \ \ wwwbaseCacheSet\ 1\n\ \ \ \ \ \ \ \ switch\ -exact\ --\ \$response(format)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ csv\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ set\ Content-Disposition\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"attachment\;\ filename=product.csv\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ form\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ puts\ \{\}\ \n\ \ \ \ \ \ \ \ puts\ -nonewline\ \$resultData\n\ \ \ \ \ \ \ \ \n\ \ \ \ \nIn\ addition,\ I\ have\ added\ header\ information,\ if\ the\ result\ is\ cacheable\n\n======\n\ \ \ \ if\ \{\$fCacheable\}\ \{\n\ \ \ \ \ \ \ \ headers\ set\ Cache-Control\ max-age=86400,must-revalidate\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ set\ Cache-Control\ \"max-age=86400,must-revalidate\"\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ set\ Cache-Control\ \"no-cache,no-store\"\n\ \ \ \ \ \ \ \ \}\n<<discussion>>\n\n<<discussion>>\ Rivet\ 2.1.x\ on\ Redhat\ and\ CentOS\n\[HaO\]\ 2013-02-26:\ I\ am\ sorry,\ Rivet\ 2.1.x\ requires\ TCL\ 8.5.10,\ due\ to\ a\ fixed\ Loadlib\ parameter.\nAs\ all\ CentOS\ and\ Redhat\ distributions\ use\ maximum\ tcl\ 8.5.7,\ Rivet\ builds\ only\ with\ a\ self-compiled\ tcl.\n\nThus,\ RPMs\ are\ only\ available\ for\ Rivet\ 2.0\ (exception:\ Fedora,\ OpenSuSE):\ \[http://software.opensuse.org/package/apache2-mod_rivet?search_term=rivet\]\n\n----\n\n***\ Compile\ Log\ for\ CentOS\ 6.2\ 64\ bit\ ***\n\n***Compile\ Log\ for\ CentOS\ 6.2\ 64\ bit***\nIt\ is\ build\ by\ user\ \"admin\"\ in\ the\ folder\ \"test\".\nPlease\ use\ your\ own\ user\ name\ and\ temporary\ build\ folder.\nThe\ final\ location\ is\ '/usr/local/*'.\n\n\[MarcoP\]:\ The\ procedure\ works\ also\ for\ CentOS\ 6.4\ 64\ bit.\n\n\[MarcoP\]\ The\ procedure\ works\ also\ for\ CentOS\ 6.4\ 64\ bit.\n\n****Create\ files****\nOne\ may\ use\ 'vi'\ for\ that\ as\ follows:\n\ \ \ *\ vi\ <filename>\n\ \ \ *\ press\ key\ `a`\ to\ append\ text\n\ \ \ *\ type\ your\ text\ or\ copy\ it\ from\ the\ clipboard\ or\ this\ web-page\n\ \ \ *\ press\ the\ keys\ `esc`,\ `:`\ and\ `x`\ to\ save\ and\ exit\n\n****\ Prepare\ build\ environment\ ****\n\n****Prepare\ build\ environment****\n\n======none\n======none\n\nThis\ is\ on\ a\ german\ locale,\ \[MarcoP\]\ english\ is:\n======none\n======\n\n======none\n======none\n======\n\nCreate\ a\ file\ /usr/local/share/config.site\ with\ contents:\n\n======none\ntrue\n======\n\n****\ Compile\ and\ install\ Tcl\ ****\n\n****Compile\ and\ install\ TCL****\nInvoke\ the\ following\ commands\ as\ user\ 'admin':\nTCL\ source\ distribution\ is\ in\ '/home/admin/test'.\n======none\ncd\ test\ngzip\ -d\ tcl8.6.0.tar.gz\ntar\ xvf\ tcl8.6.0.tar.gz\ncd\ tcl8.6.0/unix\n./configure\nmake\n======\n\nNow\ change\ to\ root\ user,\ install\ and\ set\ link\ in\ '/usr/lib64':\n======none\nsu\nmake\ install\ncd\ /usr/lib64\nln\ -s\ /usr/local/lib64/libtcl8.6.so\n======\n\n\n****\ Compile\ and\ install\ Rivet\ 2.1.1\ ****\n\n****Compile\ and\ install\ Rivet\ 2.1.1****\nInvoke\ as\ user\ 'admin':\n\n======none\ngzip\ -d\ rivet-2.1.1.tar.gz\ntar\ xvf\ rivet-2.1.1.tar\ncd\ rivet-2.1.1\n./configure\ --with-tcl=/usr/local/lib64\ --with-apxs=/usr/sbin/apxs\ --with-tclsh=/usr/local/bin/tclsh8.6\ --with-apache-version=2\ --with-rivet-target-dir=/usr/local/lib64/rivet\ --enable-version-display\ --enable-64bit\nmake\n======\n\n======none\nsu\nmake\ install\n======\n\n======none\n\n======none\nLoadModule\ rivet_module\ modules/mod_rivet.so\n\n#\ Let\ the\ module\ handle\ .rvt\ and\ .tcl\ files.\nAddType\ application/x-httpd-rivet\ \ rvt\nAddType\ application/x-rivet-tcl\ \ \ \ tcl\n\n#\ The\ default\ charset\ can\ be\ specified\ in\ the\ configuration\nAddType\ \"application/x-httpd-rivet\;\ charset=utf-8\"\ rvt\n\n#\ Add\ index.rvt\ to\ the\ list\ of\ files\ that\ will\ be\ served\nDirectoryIndex\ index.rvt\n======\n\nRestart\ apache:\n======\nservice\ httpd\ restart\n======\n\n<<discussion>>\n\n----\n\n\[BH\]\ 2013-07-02\ 14:27:41:\n'''\[BH\]\ -\ 2013-07-02\ 14:27:41'''\n\n\ \ \ *\ \ yast\ install\ apache2,\ apache2-devel,\ tcl8.5\ and\ tcl8.5-devel\n\n\ \ \ *\ \ cd\ rivet2.1.2\n\ \ \ *\ \ compile\ River\n\n======none\n\ \ \ aclocal\n\ \ \ autoreconf\n\ \ \ ./configure\ --with-tcl=/usr/lib\ --with-apache-version=2\ \\\n\ \ \ \ \ \ \ \ --with-tclsh=/usr/bin/tclsh\ --with-apache=/usr\ \\\n\ \ \ \ \ \ \ \ --with-rivet-target-dir=/usr/lib/myrivetlib\ \\\n\ \ \ \ \ \ \ \ --with-apxs=/usr/sbin/apxs2\n\ \ \ make\n\ \ \ su\n\ \ \ make\ install\n\$\ aclocal\n\n\ \ \ vi\ /etc/apache2/mod_rivet.conf\ and\ added\ in\ it:\n\ \ \ #\ start\ of\ file\ /etc/apache2/mod_rivet.conf\n\ \ \ AddType\ application/x-httpd-rivet\ \ rvt\n\ \ \ AddType\ application/x-rivet-tcl\ \ \ \ tcl\n\ \ \ AddType\ \"application/x-httpd-rivet\;\ charset=utf-8\"\ rvt\n\ \ \ #\ end\ of\ file\ /etc/apache2/mod_rivet.conf\n\ \ \ Add\ \"rivet\"\ to\ APACHE_MODULES\n\n\ \ \ *\ \ Add\ \"/etc/apache2/mod_rivet.conf\"\ to\ APACHE_CONF_INCLUDE_FILES\ in\ httpd.conf\n\ \ \ *\ \ Installing\ the\ river\ packages.\n\n======none\n\ \ \ cd\ rivet2.1.2\n\ \ \ make\ install-packages\n======none\n\$\ vi\ /srv/www/htdocs/test.rvt\n\ \ \ vi\ /srv/www/htdocs/test.rvt\n\ \ \ <?\n\ \ \ \ package\ require\ Rivet\n\ \ \ \ package\ require\ Session\n\ \ \ \ package\ require\ DIO\n\ \ \ \ package\ require\ form\n<?\n\ \ \ \ puts\ \"<b>I\ got\ right\ here!</b>\"\n\ \ \ ?>\n?>\n\ \ \ service\ apache2\ start\n%\ service\ apache2\ start\n\ \ \ and\ got\ the\ magic\ \"I\ got\ right\ here!\".\n\n\ \ \ *\ \ Thanks\ to\ Harald\ and\ Massimo\ in\ helping\ me\ to\ get\ it\ working.\n\n----\n\n\[RJM\]:\ I\ want\ to\ add\ the\ mc\ package\ to\ apache\ rivet.\ Of\ course,\ this\ question\ applies\ more\ in\ general:\ how\ can\ I\ add\ Tcl\ extensions\ to\ rivet?\n\[RJM\]\ \ I\ want\ to\ add\ the\ mc\ package\ to\ apache\ rivet.\ Of\ course,\ this\ question\ applies\ more\ in\ general:\ how\ can\ I\ add\ Tcl\ extensions\ to\ rivet? regexp2} CALL {my render Rivet \[http://tcl.apache.org/rivet/Rivetlogo_small.png\]\n\n\[Apache\]\ Rivet\ is\ the\ next\ generation\ of\ \[mod_dtcl\]\ and\ \[NeoWebScript\],\ combined:\n\"like\ \[PHP\],\ but\ with\ \[Tcl\].\"\ \ More\ info\ appears\ at\ http://tcl.apache.org/rivet/\n\nWas\ this\ made\ by\ the\ same\ people\ as\ NWS\ and\ mod_dtcl,\ or\ is\ it\ a\ separate\ team\ of\ developers?\ \ -\[FW\]\n\nCurrent\ developers\ on\ Rivet\ are\ \[Massimo\ Manghi\],\ \[Harald\ Oehlmann\],\ \[Karl\ Lehenbauer\]\ and\ sometimes\ \[David\ Welton\].\ \ \[Damon\ Courtney\],\ \[Brad\ Morrison\],\ \[Pat\ Thoyts\]\ and\ \[Andy\ Doerr\]\ have\ all\ greatly\ contributed\ in\ the\ past.\n\nThere\ is\ a\ Windows\ binary\ version\ for\ Apache\ (not\ Apache2)\ here:\ http://www.apache.mirrors.versehost.com/tcl/rivet/binary/\n\nhttp://tcl.apache.org/rivet/static/rn-2-1.html%|%Rivet\ 2.1.4%|%\ released.\ \n\nUbuntu\ has\ Rivet\ in\ its\ repositories\ but\ it\ might\ be\ necessary\ to\ change\ mpm-event\ to\ mpm-prefork\ in\ apache\ config\ (mods\ enabled)\n\n----\nTry\ \[THP\]\ as\ an\ alternative.\ \ A\ webserver\ neutral\ way\ to\ embed\ Tcl\ code.\ --\[CAU\]\n\n----\nCan\ we\ have\ some\ testimonials\ by\ Rivet\ users?\ \ (sorry,\ i'm\ new\ to\ servers\ in\ general)\n\n\ \ \ 1.\ how\ do\ you\ connect\ to\ a\ db,\ tcl\ db\ extensions?\n\ \ \ 2.\ is\ an\ apache\ instance\ with\ rivet\ and\ tomcat\ possible?\ encouraged?\n\ \ \ 3.\ mod_rewrite\ in\ the\ midst\ of\ all\ this,\ or\ is\ that\ only\ available\ on\ top\ of\ a\ tomcat\ instance?\n\ \ \ 4.\ are\ importing\ libraries\ like\ \[tcllib\]\ a\ piece\ of\ cake\ after\ rivets\ installed?\n\n\ni\ want\ to\ run\ a\ dual\ \[java\]/tcl\ environment...\n\n----\n\[davidw\]\ -\ I\ think\ these\ questions\ are\ more\ appropriate\ for\ the\ newsgroup\ or\ the\ rivet\ mailing\ list,\ but\ I'll\ give\ it\ a\ shot:\n\n1)\ You\ use\ regular\ Tcl\ database\ extensions.\ \ Rivet\ is\ pretty\ much\ standard\ Tcl,\ making\ a\ lot\ of\ the\ code\ you\ write\ for\ it\ reusable\ on\ or\ off\ the\ web.\n\n2)\ I've\ never\ mixed\ Apache\ and\ Tomcat.\ \ I\ don't\ really\ care\ for\ Java\ for\ these\ sorts\ of\ things\ unless\ you\ have\ a\ *big*\ infrastructure,\ and\ that's\ not\ something\ I've\ dealt\ with\ a\ lot.\n\n3)\ mod_rewrite\ is\ an\ Apache\ thing\ and\ it\ works\ just\ fine\ with\ Rivet.\ \ In\ fact,\ it's\ encouraged\ if\ you\ want\ to\ do\ things\ like\ have\ one\ rivet\ script\ respond\ to\ a\ whole\ virtual\ directory\ tree.\ \ So\ /foo/bar/\ /foo/baz/\ /foo/bee/bop\ and\ so\ forth\ are\ all\ mapped\ to\ foo.tcl?bar\ foo.tcl?baz\ foo?bee+bop\ and\ so\ forth.\n\n4)\ tcllib\ and\ other\ libs\ are\ a\ piece\ of\ cake:-)\n\n----\nAbout\ Rivet's\ mailing\ list,\ \[http://tcl.apache.org/rivet/about.rvt\]\ says:\ \"This\ list\ is\ archived\ here:\ \[http://mail-archives.apache.org/eyebrowse/SummarizeList?listId=118\]\".\ But\ leads\ to\ an\ error:\ \"Required\ parameter\ 'listId'\ or\ 'listName'\ is\ missing\ or\ invalid\".\n\n\[JJR\]:\ The\ mailing\ list\ archives\ for\ the\ tcl\ apache\ projects\ can\ be\ found\ at\ \[http://mail-archives.apache.org/mod_mbox/#tcl\]\ .\n\n----\nRivet\ \"lets\ you\ program\ in\ not\ only\ mixed\ HTML/Tcl,\ but\ also\ pure\ Tcl,\ which\nis\ good\ for\ separating\ content\ and\ presentation.\"\n\n----\n\[RLH\]:\ Are\ there\ any\ Rivet\ tutorials\ mucking\ about?\n\n\[Massimo\ Manghi\]:\ Rivet\ manuals\ have\ examples\ for\ both\ configuration\ and\ programming.\ Rivet\ extends\ Tcl\ with\ a\ small\ set\ of\ new\ commands\ dedicated\ to\ web\ programming\ and\ therefore\ having\ a\ good\ Tcl\ manual\ can\ be\ useful,\ depending\ on\ the\ familiarity\ of\ the\ developer\ with\ the\ language.\n\n----\n\[davidw\]:\ Not\ yet,\ but\ Rivet\ is\ very\ similar\ to\ plain\ old\ Tcl,\ and\ the\ differences\ are\ covered\ in\ the\ documentation.\n\nAs\ far\ as\ programming\ style,\ if\ you\ are\ doing\ something\ simple...\ just\ go\ ahead\ and\ mix\ your\ HTML\ and\ Tcl\ code.\ \ If\ it's\ a\ more\ complex\ app,\ separate\ things\ out\ into\ .tcl\ files\ that\ act\ as\ the\ logic\ and\ use\ .rvt\ files\ simply\ as\ templates.\n\nOr\ write\ the\ mailing\ list\ for\ more\ specific\ questions...\n\n\[RLH\]:\ I\ am\ looking\ for\ something\ similiar\ to\ HTML::Template\ \[http://html-template.sourceforge.net/article.html\]\ from\ the\ Perl\ side\ of\ the\ house.\ I\ like\ the\ clean\ separation\ of\ code\ and\ HTML.\ \ :\ )\n\n----\nThat\ perl\ template\ stuff\ just\ adds\ funny\ tags,\ which\ are\ not\ standard\ HTML.\ \ If\ you\ want\ to\ separate\ code\ and\ templates,\ do\ your\ processing\ in\ a\ .tcl\ file,\ then\ do\ \"parse\ foo.rvt\",\ and\ in\ the\ .rvt\ file,\ put\ statements\ like\ <?\ puts\ \$foo\ ?>\ <?\ puts\ \$bar?>\ where\ you\ need\ variable\ values.\ \ Or\ if\ you\ really\ wanted\ to\ do\ something\ fancy,\ you\ could\ call\ the\ parse.rvt\ in\ its\ own\ namespace/interpreter/whatever\ from\ the\ .tcl\ file,\ and\ create\ procs\ that\ are\ aliases\ to\ your\ variables,\ so\ all\ you\ have\ to\ do\ is\ <?foo?>\ <?bar?>\ in\ order\ to\ get\ output.\ \ I\ suppose\ a\ standardized\ way\ of\ doing\ this\ would\ be\ nice,\ but\ it\ is\ pretty\ easy...\ experiment\ and\ tell\ us\ (on\ the\ list,\ please)\ what\ you\ end\ up\ liking!\n\n\[RLH\]:\ You\ are\ correct\ about\ the\ funny\ tags,\ I\ meant\ more\ of\ a\ \"standard\ way\ of\ doing\ this...\"\ as\ you\ said.\ I\ will\ go\ with\ your\ suggestions.\ I\ am\ far\ from\ good\ enough\ to\ create\ the\ \"standard\ way\"\ though.\ \ :\ )\n\n----\n\[RLH\]\ 2006-02-07:\ Are\ there\ any\ hosting\ companies\ that\ support\ Rivet?\n\n\[Roy\ Keene\]\ 2008-10-06:\ Any\ Rivet\ application\ can\ be\ turned\ into\ an\ HTTP/CGI\ application.\ \ And\ with\ Starpacks\ the\ entire\ thing\ can\ be\ completely\ self-contained\ in\ one\ file.\n\n----\n\[APW\]\ 2007-01-20:\ if\ you\ have\ problems\ installing\ \[Tcl\ and\ Rivet\ on\ Windows\]\ follow\ the\ link.\n\n----\n\[Roy\ Keene\]\ 2008-10-05:\ Rivet\ can\ also\ be\ implemented\ transparently\ using\ CGI.\ \ This\ has\ the\ advantage\ of\ using\ \"suEXEC\"\ and\ working\ well\ with\ all\ versions\ of\ Apache.\ More\ information\ can\ be\ found\ on\ the\ Rivet/CGI\ page\ (\[http://www.rkeene.org/projects/info/wiki/51\])\n\n\[Roy\ Keene\]\ 2009-03-20:\ Rivet/CGI\ (\[http://www.rkeene.org/projects/info/wiki/51\])\ now\ supports\ converting\ a\ Rivet\ application\ into\ a\ Starkit\ (which\ can\ be\ turned\ into\ a\ Starpack)\n\n----\n\[PWQ\]\ 2011-09-27:\ See\ \[Rivet\ -\ OpenBsd\ 4.9\]\ for\ installation\ notes\ on\ OpenBSD.\n\n----\n2012-07-07:\ \[Massimo\ Manghi\]\ gave\ a\ speech\ on\ \[http://www.eurotcl.tcl3d.org/program.html%|%EuroTCL%|%\].\nThe\ \[http://www.eurotcl.tcl3d.org/eurotcl-2012/presentations/11-Manghi-Rivet.odp%|%slides%|%\]\ gave\ a\ good\ overview\ of\ current\ Rivet\ capabilities.\n\n----\n<<discussion>>\ Apache\ start\ error:\ can\ not\ locate\ tcllib8.5.so\ (Unix)\n\[HaO\]\ 2012-05-04:\ Rivet\ loads\ the\ tcl\ library\ using\ the\ dynamic\ linker.\n\nThus,\ it\ must\ be:\n\n\ \ \ *\ in\ the\ default\ location\ ''/usr/lib(64)''\n\ \ \ *\ or\ in\ a\ folder\ listed\ in\ the\ environment\ variable\ ''LD_LIBRARY_PATH''\ of\ apache.\n\n\nI\ felt\ it\ easier\ to\ add\ a\ symlink\ to\ ''/usr/lib(64)''\ instead\ setting\ a\ custom\ library\ path.Commands\ necessary,\ if\ tcl\ is\ installed\ in\ ''/usr/local/lib'':\n======none\n#\ cd\ /usr/lib(64)\n#\ ln\ -s\ /usr/local/lib(64)/libtcl8.5.so\n======\n<<discussion>>\n\n<<discussion>>\ Apache\ start\ error:\ undefined\ symbol:\ xxx\n\[HaO\]\ 2012-05-04:\ I\ got\ the\ following\ error\ starting\ apache:\n\n''Can't\ locate\ API\ module\ structure\ `mod_rivet'\ in\ file\ /etc/httpd/modules/mod_rivet.so:\ /etc/httpd/modules/mod_rivet.so:\ undefined\ symbol:\ mod_rivet''\n\nThis\ was\ due\ to\ the\ following\ line\ in\ the\ apache\ config\ file:\n\n======none\nLoadModule\ mod_rivet\ /etc/httpd/modules/mod_rivet.so\n======\n\nThe\ second\ word\ ''mod_rivet''\ was\ incorrect\ and\ its\ value\ is\ shown\ in\ the\ error\ message.\nThe\ correct\ value\ is:\ ''rivet_module''\n\n======none\nLoadModule\ rivet_module\ /etc/httpd/modules/mod_rivet.so\n======\n\n<<discussion>>\n\n<<discussion>>\ error\ return\ page\n\n\n***\ George\ Petasis\ asked\ about\ the\ default\ error\ return\ page:\ ***\n***George\ Petasis\ asked\ about\ the\ default\ error\ return\ page:***\nreturn\ an\ error\ page?\nI\ have\ tried\ \"headers\ numeric\ 500\".\ Firefox\ sees\ that\ the\ server\ \nresponded\ with\ an\ internal\ server\ error,\ but\ I\ see\ a\ blank\ page.\nHow\ can\ I\ use\ the\ apache\ default\ error\ page?\n\n***\ Massimo\ Manghi\ answered:\ ***\n\n***Massimo\ Manghi\ answered:***\n\nA\ tcl\ error\ can\ be\ handled\ setting\ up\ an\ ErrorScript.\ If\ the\ error\ is\ raised\ by\ an\ abnormal\ condition\ you\ are\ catching\ somehow\ in\ your\ code\ you\ may\ call\ 'abort_page\ <abort_code>'\ which\ will\ trigger\ the\ code\ set\ up\ in\ AbortScript.\ Within\ this\ script\ you\ can\ check\ which\ condition\ brought\ about\ the\ error\ using\ the\ 'abort_code'\ command\ that\ is\ supposed\ to\ return\ the\ <abort_code>\ you\ passed\ when\ you\ fired\ the\ exception.\n\nSee\ also\ the\ 'headers'\ and\ 'no_body'\ commands\n\nSurely\ you\ can\ design\ your\ own\ error\ page\ if\ you\ want.\ It\ should\ imply\ some\ extra\ work\ but\ greater\ flexibility\n\nDid\ you\ check\ this\ page\ about\ error\ customization\ in\ Apache?\n\nhttp://httpd.apache.org/docs/2.0/custom-error.html\n\n***\ George\ Petasis\ asked\ how\ to\ use\ the\ standard\ Apache\ error\ page\ ***\n\n***George\ Petasis\ asked\ how\ to\ use\ the\ standard\ Apache\ error\ page***\nIs\ this\ possible?\ \n\n***\ Massimo\ answered\ that\ this\ is\ propably\ not\ possible\ ***\n\n***Massimo\ answered\ that\ this\ is\ propably\ not\ possible***\n\nApache\ will\ certainly\ return\ its\ standard\ error\ messages\ when\ an\ internal\ abnormal\ condition\ occur\ that\ cannot\ be\ handled\ by\ Rivet.\nMore\ questions\ come\ up\ to\ my\ mind\ related\ to\ the\ error\ handling\ and\ Rivet\ interaction\ with\ other\ Apache\ components.\n\n***\ Harald\ Oehlmann\ wrote,\ why\ you\ need\ your\ own\ error\ page\ ***\n\n***Harald\ Oehlmann\ wrote,\ why\ you\ need\ your\ own\ error\ page***\nWhy\ ?\ It\ depends\ on\ the\ requested\ format.\nI\ follow\ the\ book\ \"RESTful\ Web\ Services\ Cookbook\"\ by\ Subbu\ Allamaraju.\nHalf\ the\ book\ is\ about\ \"error\ return\"...\n\nMy\ example:\n\n\nA\ data\ base\ is\ queried\ and\ there\ are\ the\ following\ formats\ available:\n\n\ \ \ *\ web\ (pretty\ web\ page)\n\ \ \ *\ http\ table\n\n\ \ \ *\ xml\ table\n\ \ \ *\ csv\ table\n\nFirst,\ I\ find\ out\ the\ required\ destination\ format:\n\ \ \ *\ A\ form\ variable\n\ \ \ *\ if\ not\ given:\ headers(Accept)\n\ \ \ \ \ ->\ there\ is\ a\ new\ method\ in\ 2.0.5\ to\ easily\ parse\ this\n\nThen\ I\ look\ into\ the\ data\ base.\nIf\ the\ required\ data\ is\ not\ found\ or\ there\ is\ another\ error,\ I\ output\nerror\ pages\ depending\ on\ the\ required\ format\ and\ the\ set\ http\ status.\nSee\ also,\ that\ I\ flag\ \"not\ found\ data\"\ as\ cacheable,\ but\ server\ errors\nas\ not\ \;-)\n\n======\nif\ \{\[catch\ \{\n\ \ \ \ set\ resultData\ \[wwwbaseProductDataGet\\\n\ \ \ \ if\ \{\[catch\ \{\n\ \ \ \ \ \ \ \ set\ resultData\ \[wwwbaseProductDataGet\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[env\ REMOTE_ADDR\]\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[var\ get\ log\]\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(key)\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"\"\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(country)\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(language)\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(date)\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$response(format)\]\n\ \ \ \ \}\ Err\ dErr\]\}\ \{\n\ \ \ \ \ \ \ \ switch\ -exact\ --\ \[dict\ get\ \$dErr\ -errorcode\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ PARAM\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ >\ Return\ 400\ Bad\ request\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ wwwbaseCacheSet\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ numeric\ 400\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ NOT_FOUND\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ >\ Return\ 404\ Not\ found\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ wwwbaseCacheSet\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ numeric\ 404\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ default\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ >\ Return\ 500\ Internal\ server\ error\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ wwwbaseCacheSet\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ numeric\ 500\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ #\ >\ Return\ 404\ Not\ found\n\ \ \ \ \ \ \ \ switch\ -exact\ --\ \$response(format)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ csv\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"Error\\n\$Err\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ json\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\\\{error:\ \\\"\$Err\\\"\\\}\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ xml\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"<error>\$Err</error>\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ html\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"<html><head><title>\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[mce\ PageTitleProductRequest\]</title>\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <body><h1>\[mce\ ErrSearch\ \$Err\]</h1></body>\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ form\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ switch\ -exact\ --\ \[dict\ get\ \$dErr\ -errorcode\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ PARAM\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \[mce\ ErrParam\ \$Err\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NOT_FOUND\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \[mce\ ErrSearch\ \$Err\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ default\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \[mce\ ErrServer\ \$Err\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \[mce\ ErrSearch\ \$Err\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #\ puts\ \$Err<br/>\[string\ map\ \{\\n\ <br/>\}\ \$::errorInfo\]\n\ \ \ \ \ \ \ \ \}\n\}\ else\ \{\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ #\ >\ Correct\ response\ is\ cacheable\n\ \ \ \ \ \ \ \ wwwbaseCacheSet\ 1\n\ \ \ \ \ \ \ \ switch\ -exact\ --\ \$response(format)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ csv\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ set\ Content-Disposition\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"attachment\;\ filename=product.csv\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ form\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ puts\ \{\}\ \n\ \ \ \ \ \ \ \ puts\ -nonewline\ \$resultData\n\ \ \ \ \ \ \ \ \n\ \ \ \ \nIn\ addition,\ I\ have\ added\ header\ information,\ if\ the\ result\ is\ cacheable\n\n======\n\ \ \ \ if\ \{\$fCacheable\}\ \{\n\ \ \ \ \ \ \ \ headers\ set\ Cache-Control\ max-age=86400,must-revalidate\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ set\ Cache-Control\ \"max-age=86400,must-revalidate\"\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ headers\ set\ Cache-Control\ \"no-cache,no-store\"\n\ \ \ \ \ \ \ \ \}\n<<discussion>>\n\n<<discussion>>\ Rivet\ 2.1.x\ on\ Redhat\ and\ CentOS\n\[HaO\]\ 2013-02-26:\ I\ am\ sorry,\ Rivet\ 2.1.x\ requires\ TCL\ 8.5.10,\ due\ to\ a\ fixed\ Loadlib\ parameter.\nAs\ all\ CentOS\ and\ Redhat\ distributions\ use\ maximum\ tcl\ 8.5.7,\ Rivet\ builds\ only\ with\ a\ self-compiled\ tcl.\n\nThus,\ RPMs\ are\ only\ available\ for\ Rivet\ 2.0\ (exception:\ Fedora,\ OpenSuSE):\ \[http://software.opensuse.org/package/apache2-mod_rivet?search_term=rivet\]\n\n----\n\n***\ Compile\ Log\ for\ CentOS\ 6.2\ 64\ bit\ ***\n\n***Compile\ Log\ for\ CentOS\ 6.2\ 64\ bit***\nIt\ is\ build\ by\ user\ \"admin\"\ in\ the\ folder\ \"test\".\nPlease\ use\ your\ own\ user\ name\ and\ temporary\ build\ folder.\nThe\ final\ location\ is\ '/usr/local/*'.\n\n\[MarcoP\]:\ The\ procedure\ works\ also\ for\ CentOS\ 6.4\ 64\ bit.\n\n\[MarcoP\]\ The\ procedure\ works\ also\ for\ CentOS\ 6.4\ 64\ bit.\n\n****Create\ files****\nOne\ may\ use\ 'vi'\ for\ that\ as\ follows:\n\ \ \ *\ vi\ <filename>\n\ \ \ *\ press\ key\ `a`\ to\ append\ text\n\ \ \ *\ type\ your\ text\ or\ copy\ it\ from\ the\ clipboard\ or\ this\ web-page\n\ \ \ *\ press\ the\ keys\ `esc`,\ `:`\ and\ `x`\ to\ save\ and\ exit\n\n****\ Prepare\ build\ environment\ ****\n\n****Prepare\ build\ environment****\n\n======none\n======none\n\nThis\ is\ on\ a\ german\ locale,\ \[MarcoP\]\ english\ is:\n======none\n======\n\n======none\n======none\n======\n\nCreate\ a\ file\ /usr/local/share/config.site\ with\ contents:\n\n======none\ntrue\n======\n\n****\ Compile\ and\ install\ Tcl\ ****\n\n****Compile\ and\ install\ TCL****\nInvoke\ the\ following\ commands\ as\ user\ 'admin':\nTCL\ source\ distribution\ is\ in\ '/home/admin/test'.\n======none\ncd\ test\ngzip\ -d\ tcl8.6.0.tar.gz\ntar\ xvf\ tcl8.6.0.tar.gz\ncd\ tcl8.6.0/unix\n./configure\nmake\n======\n\nNow\ change\ to\ root\ user,\ install\ and\ set\ link\ in\ '/usr/lib64':\n======none\nsu\nmake\ install\ncd\ /usr/lib64\nln\ -s\ /usr/local/lib64/libtcl8.6.so\n======\n\n\n****\ Compile\ and\ install\ Rivet\ 2.1.1\ ****\n\n****Compile\ and\ install\ Rivet\ 2.1.1****\nInvoke\ as\ user\ 'admin':\n\n======none\ngzip\ -d\ rivet-2.1.1.tar.gz\ntar\ xvf\ rivet-2.1.1.tar\ncd\ rivet-2.1.1\n./configure\ --with-tcl=/usr/local/lib64\ --with-apxs=/usr/sbin/apxs\ --with-tclsh=/usr/local/bin/tclsh8.6\ --with-apache-version=2\ --with-rivet-target-dir=/usr/local/lib64/rivet\ --enable-version-display\ --enable-64bit\nmake\n======\n\n======none\nsu\nmake\ install\n======\n\n======none\n\n======none\nLoadModule\ rivet_module\ modules/mod_rivet.so\n\n#\ Let\ the\ module\ handle\ .rvt\ and\ .tcl\ files.\nAddType\ application/x-httpd-rivet\ \ rvt\nAddType\ application/x-rivet-tcl\ \ \ \ tcl\n\n#\ The\ default\ charset\ can\ be\ specified\ in\ the\ configuration\nAddType\ \"application/x-httpd-rivet\;\ charset=utf-8\"\ rvt\n\n#\ Add\ index.rvt\ to\ the\ list\ of\ files\ that\ will\ be\ served\nDirectoryIndex\ index.rvt\n======\n\nRestart\ apache:\n======\nservice\ httpd\ restart\n======\n\n<<discussion>>\n\n----\n\n\[BH\]\ 2013-07-02\ 14:27:41:\n'''\[BH\]\ -\ 2013-07-02\ 14:27:41'''\n\n\ \ \ *\ \ yast\ install\ apache2,\ apache2-devel,\ tcl8.5\ and\ tcl8.5-devel\n\n\ \ \ *\ \ cd\ rivet2.1.2\n\ \ \ *\ \ compile\ River\n\n======none\n\ \ \ aclocal\n\ \ \ autoreconf\n\ \ \ ./configure\ --with-tcl=/usr/lib\ --with-apache-version=2\ \\\n\ \ \ \ \ \ \ \ --with-tclsh=/usr/bin/tclsh\ --with-apache=/usr\ \\\n\ \ \ \ \ \ \ \ --with-rivet-target-dir=/usr/lib/myrivetlib\ \\\n\ \ \ \ \ \ \ \ --with-apxs=/usr/sbin/apxs2\n\ \ \ make\n\ \ \ su\n\ \ \ make\ install\n\$\ aclocal\n\n\ \ \ vi\ /etc/apache2/mod_rivet.conf\ and\ added\ in\ it:\n\ \ \ #\ start\ of\ file\ /etc/apache2/mod_rivet.conf\n\ \ \ AddType\ application/x-httpd-rivet\ \ rvt\n\ \ \ AddType\ application/x-rivet-tcl\ \ \ \ tcl\n\ \ \ AddType\ \"application/x-httpd-rivet\;\ charset=utf-8\"\ rvt\n\ \ \ #\ end\ of\ file\ /etc/apache2/mod_rivet.conf\n\ \ \ Add\ \"rivet\"\ to\ APACHE_MODULES\n\n\ \ \ *\ \ Add\ \"/etc/apache2/mod_rivet.conf\"\ to\ APACHE_CONF_INCLUDE_FILES\ in\ httpd.conf\n\ \ \ *\ \ Installing\ the\ river\ packages.\n\n======none\n\ \ \ cd\ rivet2.1.2\n\ \ \ make\ install-packages\n======none\n\$\ vi\ /srv/www/htdocs/test.rvt\n\ \ \ vi\ /srv/www/htdocs/test.rvt\n\ \ \ <?\n\ \ \ \ package\ require\ Rivet\n\ \ \ \ package\ require\ Session\n\ \ \ \ package\ require\ DIO\n\ \ \ \ package\ require\ form\n<?\n\ \ \ \ puts\ \"<b>I\ got\ right\ here!</b>\"\n\ \ \ ?>\n?>\n\ \ \ service\ apache2\ start\n%\ service\ apache2\ start\n\ \ \ and\ got\ the\ magic\ \"I\ got\ right\ here!\".\n\n\ \ \ *\ \ Thanks\ to\ Harald\ and\ Massimo\ in\ helping\ me\ to\ get\ it\ working.\n\n----\n\n\[RJM\]:\ I\ want\ to\ add\ the\ mc\ package\ to\ apache\ rivet.\ Of\ course,\ this\ question\ applies\ more\ in\ general:\ how\ can\ I\ add\ Tcl\ extensions\ to\ rivet?\n\[RJM\]\ \ I\ want\ to\ add\ the\ mc\ package\ to\ apache\ rivet.\ Of\ course,\ this\ question\ applies\ more\ in\ general:\ how\ can\ I\ add\ Tcl\ extensions\ to\ rivet?} CALL {my revision Rivet} CALL {::oo::Obj3235425 process revision/Rivet} CALL {::oo::Obj3235423 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4