Hi,
Let me explain what I am working on:
I have written an Apache module (which I am calling Glossary) which, when
it receives a page request, highlights terms in the page which are found in
an online glossary. This way a user can click on the highlighted term and
go view the description.
All of the terms and cross-references, besides being stored in a database,
are included in a tab-separated text file. When a page is requested, the
module reads the text file into a hash. It then goes through the page and
links those terms found in the hash. This part is working very well right
now, however, here is the catch.
I want to make it so that it only highlights the first instance of a term
in a page, so what I did was to delete the term from the hash after it has
been highlighted. But this is having the inconsistent problem of not
always highlighting all of the terms on subsequent requests and it seems
that only restarting the httpd will truly reset everything. I am assuming
that this is because the hash state is remaining in its altered state when
another page is requested.
So, my question is: How can I make certain that the hash is reset for each
page request? Is there a way to make this hash local to the individual
child process which serves up the specific page? Is there a better way to
go about this?
Kevin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Kevin Ward, SSAI
Earth Observatory Technical Manager
NASA Goddard Space Flight Center
Code 910.4, Greenbelt, MD 20771
(301) 286-9179
[EMAIL PROTECTED]
http://earthobservatory.nasa.gov
Subscribe to eo-announce!
Send body "subscribe eo-announce <your email>"
to [EMAIL PROTECTED]
Work to become, not to acquire
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^