Friday, July 30, 2010

Javascript and Apache Madness

I was able to create an index page for this directory by editing the output of Mozilla's directory show web page; removing all but the anchored file names with emacs and reqular-expression edits,good stuff, but it still doesn't really solve the essential problem which is how to update the index file and automate the process, especially if annotations can be found in the files themselves.

Enter Javascript and a search to find if people have already done something like this. Apache is complicated enough that I never got around to enabling pHp, which I had used to solve this problem once before. There are javascripts that can do a directory display in a couple of lines, true enough, but two problems emerge, the page from which I got these to try claims that the dir will not run if there is an index.html file, which is not true, and the display always has a link to the containing dir. This is a big security hole since I can go anywhere on the filesystem with it. This last problem is fixed by using a .htaccess file to turn off web access to dirctories and files. For instance, I want only HTML files to show.

I set about to find out where the template for the dir display comes from. It is probably somewhere in apache, but I haven't found it yet. Looking at what is saved from the display, the HTML generated, gives lots of clues. The link to the up dir is given the HTML id of UL_goUp, but there is not a clue about where that is set, maybe it is in some apache mod, and I'd only like to change it when it is on my web space.

The Complexity Races Ahead of the Documentation

Maybe there is some module in apache that controlls the boilerplate for the directory display, but search engines and the torrent of unreliable comments on the Internet make finding documentation difficult, and when you do find docs, they are often incomplete and pooly written. This stuff is too complex. Fortunately, one does see integration and simplification, but it is inconsistant and people represent their stuff as simple, untill you want it to do something different. They have chosen the simple stuff to sell you on using it, and glossed over or ignored the problematic stuff.

Crickets singing in Major and Minor Seconds Tonight

A few days ago I wrote about the crickets chorusing this time of year. Tonight I noticed two or more singing in different pitches and rates, beating in an out of phase. I also heard a major second and sometimes a sequence of two minor seconds. At the moment I hear only one note, not two or more.

Free Web Hosting