|
From: Nick C. <ni...@cl...> - 2002-01-20 19:51:14
|
On Sun, Jan 20, 2002 at 05:27:48PM +0000, Dave Cross wrote: > > Thinking as I write this (so don't shout me down if the idea's crap) how > about a configuration script that could work as a CGI script. Load both the > config script and the target nms script into your cgi-bin. Run the config > script as a cgi script and it checks out certain options and alters the > source of the target script to run on the new server. > > Of course, there's a bootstrapping problem. You'd need to know the path > to perl. Anyone got any comments on this? Even though everyone does it, it's bad security to have the CGI scripts writable by the UID they run as. Also thinking as I write this, how about a web page on which the user fills in a form and a customised version of the script is generated for them ? The idea of a config CGI meshes quite well with this, since it could produce output specifying the location of perl/sendmail and the available modules and so on, which the user could then paste into the script generation webpage. Some advantages this would have: The guestbook CGI doubles in size with the inclusion of the HTML filter, which isn't needed if $allow_html is 0. The user could uncheck the 'allow HTML feature' box on the script generation page and halve the size of the script. We could have a single source file in CVS for components like the HTML filter and other bits that appear in more than one script. We could use CPAN modules if available. Portability workarounds (like the CGI set_message thing) could be removed if not needed, making the scripts more accessible to beginners. If nobody is laughing too hard yet, maybe I'll take a whack at doing a page like this for one of the scripts to see if it's workable. If this seems mad, it probably is. -- Nick |