Summary | File based preference driver |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | thomas.jarosch (at) intra2net (dot) com |
Created | 04/25/2008 (6280 days ago) |
Due | |
Updated | 05/20/2008 (6255 days ago) |
Assigned | 05/02/2008 (6273 days ago) |
Resolved | 05/02/2008 (6273 days ago) |
Milestone | |
Patch | Yes |
It's not quite clear where this points when this path is relative. I
can put in an absolute path, but I'd like to keep the preference
system inside of the horde installation for portability.
relates to.
The best solution would be to relative to the horde base, but this
imposes security problems anyway if you don't protect the directory
with a .htaccess file from outside access. It's not easy to fix as
horde will not provide an empty file-based prefs directory by default.
Maybe it's best to prevent relative paths at all to protect users from
accidentally exposing sensitive preference data? Though this would be
quite the opposite to what you've asked for... :o)
Thomas
this backend is when your administration discourages databases.
in the config: "Directory to store the preferences in."
It's not quite clear where this points when this path is relative. I
can put in an absolute path, but I'd like to keep the preference
system inside of the horde installation for portability.
(I'm not sure if this should be filed separately)
Assigned to Chuck Hagenbuch
Taken from
State ⇒ Resolved
State ⇒ Assigned
Assigned to
New Attachment: framework-Prefs-file-v2.php
look at how the SQL prefs driver acts if it can't connect to the db,
and do the same thing. Thanks!
look at how the SQL prefs driver acts if it can't connect to the db,
and do the same thing. Thanks!
- Loose coupling if you integrate it with another system:
Easy delete/rename/restore/backup of user preferences
as prefs are stored as /some/where/##USERNAME##.prefs.
- Scalability: Using sqlite, two or more processes cannot write
to the same database at the same time. You either busy wait
or get a timeout in the worst case. No worries with the file based prefs.
- Speed should be equal or faster, but preference data is usually
very small, so that shouldn't be taken into account.
- We had two cases of corrupted sqlite databases in the past.
- No external dependencies
The /var/horde/prefs thing was just a default value to output an
error message in the log. I'll change that to PEAR_Error if you want.
Though I don't know how the preference subsystem likes me if I do this...
State ⇒ Feedback
On the code, I haven't looked too closely yet, but /var/horde/prefs
isn't likely to be a useful default on most systems - you should
either default to /tmp, or throw a fatal error if the directory isn't
set.
New Attachment: horde-Prefs-add-file.patch
New Attachment: framework-Prefs-file.php
State ⇒ New
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ File based preference driver
Type ⇒ Enhancement
Priority ⇒ 1. Low
I've implemented a file based preference driver. Attached is the complete file
and a patch for horde/config/conf.xml. Feedback welcome.
Thomas