Wojciech Kocjan <[EMAIL PROTECTED]> writes:

> Right now I'm testing a small subscription system and here's what I
> find missing: ability to run a certain dtcl script with
> crontab. It's possible with php (php4-cgi in debian), it should be
> possible with dtcl.  Yes, there's tclsh but here's what's missing:

> - I have a lot of functions read in GlobalInitScript & ChildInitScript
>   (ie. SQL connections, mail sending functions)
> - I might want to use 'parse'

Hrm, and 'source' isn't enough?

mod_dtcl is pretty tightly tied with Apache at the moment - however,
maybe by seperating a few things out, we could make something like
dtcl-cgi.  I think the most important thing is probably the file
parser.  Most of the dtcl commands could probably be just rewritten as
Tcl procs (hputs, for instance).
 
> The only thing I came up with is putting the script somewhere within
> DocumentRoot and putting wget on cron... But this may be a security
> feature when the script will be doing unerasable duties like
> rotating logs (ie. for calculating statistics)... Or logging user
> access - this may be used to remove some entries. I know, I'm a bit
> paranoid :>

Yeah, and using wget in this way is an ugly solution in any case.

> Anyways, it would be wise for mod_dtcl to have a config file, whose
> name could preferably supplied during compilation (and overridden in
> httpd.conf :). This would allow compiling dtclsh, it reading config
> files and launching file in a dtcl-like way. Also it would allow
> testing very nasty things - like constant changing
> GlobalInit/ChildInit, loading a shared object and many other
> things. I try to use C code in many situations, so it would be nice
> to be able to test .so's w/o apachectl start every SEGV occurs...

I use 'apache -X' for testing, myself...

> I suppose it's a good idea, and if the code is separated (I don't
> suppose send_parsed_file() was ... but maybe that's changed now :).

Yes, it's a good idea, and I will work with you if you want to try and
accomplish this.  I don't know if I'll have time to do it myself in
the near future, though.

I have at least added it to the todo list on the site:-)

-- 
David N. Welton
     Personal:           http://www.efn.org/~davidw/  
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to