create new tag
, view all tags

TWiki WP Stuff



I wanted a separate page to post stuff regarding multiple things with TWiki for Windows Personal. I am taking this avenue because it's the easiest way to catalog things with a lack of time. Once I figure out how this will work I'll add a comments section at the bottom, but for now I just need a place to organize some information without a bunch of comments tacked on the end.

Post-Delivery Processing

Perl and Grep processes run substantially longer than it actually takes to generate the web page and deliver it to the browser. This can really add up when loading a series of pages one after the other. The post-processing for previous pages starts to reduce the computer's ability to deliver pages that are accessed within a short time afterwards, especially if a bunch of pages are needed in a short time period.

This seems like something that wouldn't be too hard to understand. It also seems like it is probably necessary (because if it wasn't, why is it happening?), but that on the other hand, maybe it's something that could be optimized somehow.

Multi-User TWikiWP via NAS

Ah yes, Multi-User "Windows Personal" edition TWiki. Sounds like a contradiction already. This was just a thought I've been kicking around regarding the possibility of a de-centralized TWiki installation, where centralized content is maintained on a network-attached-storage drive (NAS) and each client uses a locally run web-server. This could have several advantages but I'm not sure if it would be possible. The advantages I could see would be:

  • No authentication necessary in a corporate environment (authentication would be for access to the NAS folders)
  • NAS content could be automatically backed up using corporate procedures already established for Sarbanes-Oxley or whatnot
  • No new server hardware necessary
  • Individualized experience (links and such) based on the local webserver setup on each machine

This would have to be based on the concept that from a security point of view, you could really be anybody and there would be nothing to stop you from changing your identity, but everyone would have access to the raw file system anyway. I think this would be an easy way to get a few people testing out TWiki in a networked environment without needing extra server hardware or VMware (which could mean having to have a dedicated PC to run VMware on). It would also not open up the TWiki install to the outside world via an open webserver. Access would be limited based on your NAS authentication and having a local webserver to serve up TWiki content.

Renaming a Topic Gives a "403 Forbidden Page"

I already posted this as an issue previously, but I am also interested from a debugging point of view, how you track down what the real problem is.

  • Perl runs Rename.pl (Visible in Task Manager / Process Explorer)
  • Rename.pl executes: TWiki::UI::run( \&TWiki::UI::Manage::rename );
  • There is Manage.pm file in the twiki\lib\TWiki\UI folder

(Question #1: How does perl find this file? Using setlib.cfg?)

  • Inside Manage.pm is ---++ StaticMethod rename( $session ), "designed to be invoked via the TWiki::UI::run method."
  • So this looks like the code we're looking for
  • ...and there's this line at the end of that code: $session->redirect( $new_url );
  • 403 Forbidden seems like a web server error where the URL it's trying to access can't be obtained for some reason.
  • Looks like I get a 403 when trying to open an attachment that doesn't exist, which is consistent
  • So how do we debug what $new_url is? Guess that means learning some perl, or maybe we can look at the webserver access logs.
  • Lets get ready to rename a page and take a peak at the access.log


Rename page loaded and ready to execute...

localhost - - [28/Jan/2007:16:35:26 -0500] "GET /pub/TWiki/PatternSkin/background_button.gif HTTP/1.1" 304 -
localhost - - [28/Jan/2007:16:35:26 -0500] "GET /pub/TWiki/TWikiLogos/T-logo-80x15.gif HTTP/1.1" 304 -
localhost - - [28/Jan/2007:16:35:29 -0500] "GET /cgi-bin/view.pl/Sandbox/WebRss HTTP/1.1" 200 11539
Clicking Rename/Move (TestTopic4 to TestTopic5)
localhost - - [28/Jan/2007:16:36:30 -0500] "POST /cgi-bin/rename.pl/Sandbox/TestTopic4 HTTP/1.1" 403 -


  • From the web: "Some Web servers may also issue an 403 error if they at one time hosted your site, but now no longer do so and can not or will not provide a redirection to a new URL. In this case it is not unusual for the 403 error to be returned instead of a more helpful error." (Taken from here External site). So maybe it has something to do with the redirect being processed.

Attachments Don't Download on The First Try Sometimes

No more data available on this issue yet, except that it seems to happen often enough to notice.

Changes to TWikiWP

The following files are either additions or updates to the TWikiWP distribution .zip file. To download the script files you may need to cut and paste them into a file of the corresponding name (if downloading just spits them into a browser window).

Since I forgot where I was with these (ie, I am not sure of their current state), my current usage is: Use the start script to startup, and I basically don't use the stop script. Once the start script runs the tinyweb process, I just leave it. I can take my content between multiple computers, plug in and navigate without having to start up (once I do it one time).

Start Script

Download: Start.vbs


  • Starts TWikiForWindowsPersonal
  • Currently, copies perl to the local temp directory
  • Allows you to eject the memory key safely while letting the tinyweb.exe run in memory
  • Allows you to run the TWikiWP install off a CD

Features to Implement

  • [Add item here]

Stop Script

Download: Stop.vbs


  • Stops the tinyweb.exe process

Features to Implement

  • Optional delete for stuff in the Temp directory
  • [Add item here]


Here's the contents of the updated Autorun.inf file. It runs the startup script and adds a nifty label. It doesn't seem to work on a memory key but does work on a cd burned with a reference install of TWikiForWindowsPersonal.

open=WScript \twiki\Start.vbs
label=TWiki For Windows Personal

-- Contributors: JoshuaJohnston - 30 Jan 2007


Topic attachments
I Attachment History Action Size Date Who Comment
Quicktime movievbs Start.vbs r2 r1 manage 11.5 K 2007-01-28 - 21:21 JoshuaJohnston TWikiWP Startup Script
Quicktime movievbs Stop.vbs r1 manage 3.3 K 2007-01-28 - 21:22 JoshuaJohnston  
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2007-07-24 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.