On Fri, Jan 17, 2003 at 08:58:55PM +0000, the hatter wrote: > On Fri, 17 Jan 2003, Paul Makepeace wrote: > > > Before I write one... Has anyone heard of a simple contained script or > > tool to create & edit .htaccess and .htpasswd files? I got bored of > > doing it by hand after my first two. Web-based would be nice but a > > parser/generator would be a great start. > > I have one, somewhere, that I wrote in my more innocent years... I would > have started reworking it already as I'm needing one currently... but the > lack of crypt() on the machine hosting the site put me off that. If you
Why don't you just post it? > want to write one that does the things you need, I'll happily take it and > add the bits that I need it to do. I'll be wanting to work with .htgroup > too. Sounds like you're more interested in the initial setup stuff, > whereas I'm more concerned about ongoing management by admins and users. No, the "edit" is the magic word here. I want a web interface so admins & users can f*ck things up for themselves without relying on me to f*ck things up for them. Kake irc::suggested Apache::Htaccess which you'd think would be a winner but sadly it's saddled with a rather odd interface and an internal representation of the data (array of (command, "@args")) that I don't see making much patchable sense from. Its add/set commands are awful - calling ->directive(AuthFileUser => ".htpasswd"); destroys all the *other* directives and the DESTROY ->save method ensures there's no remains. It has no user-related methods, just groups, AFAICT. I'm going to do something that involves loading the file into a scalar and then s///ing it with more traditional OO interface semantics. If httpd.conf was real XML this would be a piece of cake. Hmm. Paul -- Paul Makepeace ....................................... http://paulm.com/ "If today is the first day of the rest of your life, then grab your coathanger!" -- http://paulm.com/toys/surrealism/