I've been modifying UseModWiki now and then, to change the TextFormattingRules to suit my own tastes. The problem is, sometimes the web server serves up a version of the page formatted by the old rules.
This first manifested itself when I altered the rule that recognizes strings of hyphens, ----
, and turns them into <hr>
in HTML. I altered it so that it would only work if ----
appeared at the beginning of a line. I then produced a bunch of ASCII art, and noticed that sometimes it would display correctly and sometimes it wouldn't. When it didn’t, it was converting the strings of hyphens into <hr>
.
Now the ASCII art always displays correctly. But I made the next set of modifications, to allow some of my favorite HTML entities like &
mdash
;
to pass through without getting their ampersands escaped. That also sometimes worked and sometimes didn't.
This behavior continues even after killing off the web server cold, and then restarting it. It even continues if I turn off the machine, cold, and restart it. (Naturally I have also tried restarting Internet Explorer, in case it is just the web cache on the local system where I’m viewing the thing. But the Apache server logs showed the page being served with different numbers of bytes, so I think the problem is with the server.)
I am running Apache/1.3.26 Ben-SSL/1.48 on a Linux box. I allowed mod_perl to compile it, as follows:
perl Makefile.PL \ APACHE_SRC=/home/httpsd/src/apache_1.3.26/ \ DO_HTTPD=1 \ USE_APACI=1 \ PERL_MARK_WHERE=1 \ EVERYTHING=1 \ APACHE_PREFIX=/home/httpsd/ \ APACI_ARGS='--enable-module=proxy --enable-module=so'
I took some of these settings from the notes on how to install Slashcode (which I haven't actually installed, but wanted to possibly install on a later date). I added mod_proxy because at one point I was playing with Apache Tomcat. I added mod_so so that I could build and use PHP.
I dropped UseModWiki into /home/httpsd/cgi-bin/
and configured it to put the Wiki database at /home/httpsd/wikidb/
. I have been editing the Perl code as root. /home/httpsd/wikidb/config
says $UseCache = 0;
and there is no /home/httpsd/wikidb/html
directory.
It seems as if Apache or mod_perl is cacheing the UseModWiki Perl script someplace on disk, and not updating the cache immediately when I change the source code. But I cannot find where this cache is located.
Strangely, touch wiki.pl
seems to have solved this problem once, but not consistently.
Any ideas?
wiki.pl
. The latter one is visited so infrequently that I just forgot it. It didn't get updated along with the often-used copy. This also explains why the problem would go away by itself for long periods. The problem switched on when I visited the other Wiki, and not before. Apparently, either mod_perl can't tell the difference between the scripts, or the two scripts, being composed of highly similar source code and utilizing eval, are trying to store parts of themselves in variables in mod_perl that have the same global name.