Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I have a perl web application (now CGI, soon mod_perl) that depends on an external search engine I am connecting to. There are three mirrors of the search engine and what I need is something like a semi automatic failover.
So I need some place where to store the IP of the instance the application should use. If I know beforehand about maintenance going on I want to change the setting by hand but I also want the application itself to change the setting after it encounters connection problems.
This last requirement makes it necessary to save it where apache has write access - but where?
the temp-dir comes to mind but that might be cleaned by other processes (like a server restart). If I use other places I need another config variable where to find the config file. Something relative to the application dir wouldn't work with mod_perl. Putting it in the lib dir and "require"-ing it from my application is good for reading but not for writing.
So I am a bit lost with this seemingly easy task. Any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Where to store config info?
by dsheroh (Monsignor) on Oct 16, 2009 at 12:46 UTC | |
|
Re: Where to store config info?
by chaos_cat (Scribe) on Oct 16, 2009 at 12:11 UTC | |
by Anonymous Monk on Oct 16, 2009 at 12:28 UTC | |
by mikelieman (Friar) on Oct 16, 2009 at 19:18 UTC | |
by Anonymous Monk on Oct 18, 2009 at 05:30 UTC | |
by afoken (Chancellor) on Oct 20, 2009 at 10:53 UTC | |
|
Re: Where to store config info?
by Anonymous Monk on Oct 22, 2009 at 19:22 UTC |