You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by "Robert S. Sciuk" <ro...@controlq.com> on 2004/11/02 21:45:32 UTC
Help with upload to variable ...
I've got the following lines in my httpd.conf file:
LoadModule rivet_module /usr/local/apache/libexec/mod_rivet.so
RivetServerConf SeperateVirtualInterps yes
RivetServerConf UploadDirectory /usr/local/apache/Upload
RivetServerConf UploadMaxSize 1024000
RivetServerConf UploadFilesToVar yes
I have added these lines to both the global section and the <virtual>
section of the relevant httpd.conf file, to no avail.
and yet I get an error when I attempt to upload into a variable:
RivetServerConf UploadFilesToVar is not set
while executing
"upload data Xyzzy"
(in namespace eval "::request" script line 20)
invoked from within
"namespace eval request {
puts -nonewline ""
I can upload and save the file, no problem, yet the server does not see my
directive for some reason. I have stopped and restarted apache several
times, and no change occurs with respect to the UpLoadToVars directive!!
I'm executing the following Rivet code ...
<?
set my_blob [upload data Xyzzy]
qht::text "my_blob contains [string length $my_blob] bytes"
# upload save Xyzzy [ format "%s/%s" $UP_DIR [upload filename Xyzzy] ]
# qht::text "Saved file [upload filename Xyzzy] ([upload size Xyzzy]
bytes) to server"
?>
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
Robert S. Sciuk http://www.controlq.com 259 Simcoe St. S.
Control-Q Research tel: 905.576.8028 Oshawa, Ont.
rob@controlq.com fax: 905.576.8386 Canada, L1H 4H3
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: Build Procedure
Posted by Karl Lehenbauer <ka...@sc.com>.
OK, I hacked on the configure.ac a bit, got it automatically finding
apxs and tclsh if they're not specified. Feel like this part is pretty
solid.
But I haven't done anything with automake.
I'm digging into it.
KL
On Dec 1, 2004, at 2:45 PM, David N. Welton wrote:
> Karl Lehenbauer <ka...@sc.com> writes:
>
>> Send me what it's doing. I'm ready to fix it. I'll gen up an
>> environment and reproduce it. I bet it's simple.
>
> http://nagoya.apache.org/eyebrowse/BrowseList?
> listId=118&by=thread&from=891959
>
> Has some of the info...
>
> There are some other threads around that time period with more
> information.
>
> --
> David N. Welton
> Personal: http://www.dedasys.com/davidw/
> Apache Tcl: http://tcl.apache.org/
> Free Software: http://www.dedasys.com/freesoftware/
> Linux Incompatibility List: http://www.leenooks.com/
>
Re: Build Procedure
Posted by "David N. Welton" <da...@dedasys.com>.
Karl Lehenbauer <ka...@sc.com> writes:
> Send me what it's doing. I'm ready to fix it. I'll gen up an
> environment and reproduce it. I bet it's simple.
http://nagoya.apache.org/eyebrowse/BrowseList?listId=118&by=thread&from=891959
Has some of the info...
There are some other threads around that time period with more
information.
--
David N. Welton
Personal: http://www.dedasys.com/davidw/
Apache Tcl: http://tcl.apache.org/
Free Software: http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: Build Procedure
Posted by Karl Lehenbauer <ka...@sc.com>.
Send me what it's doing. I'm ready to fix it. I'll gen up an
environment and reproduce it. I bet it's simple.
On Dec 1, 2004, at 12:10 PM, David N. Welton wrote:
>
> We need to figure out a solution to the build procedure problem. I
> see a couple of options as possibilities:
>
> 1) Revert to the old build system before Karl hacked on it, and then
> re-add his changes in in such a way that they do not break things
> on Linux.
>
> 2) Work from the current Tcl based build system and rework it for
> Linux.
>
> 3) Figure out how to make auto* work.
>
> I'm kind of anxious, because as things are right now I can't install
> or test the code.
>
> --
> David N. Welton
> Personal: http://www.dedasys.com/davidw/
> Apache Tcl: http://tcl.apache.org/
> Free Software: http://www.dedasys.com/freesoftware/
> Linux Incompatibility List: http://www.leenooks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>
Build Procedure
Posted by "David N. Welton" <da...@dedasys.com>.
We need to figure out a solution to the build procedure problem. I
see a couple of options as possibilities:
1) Revert to the old build system before Karl hacked on it, and then
re-add his changes in in such a way that they do not break things
on Linux.
2) Work from the current Tcl based build system and rework it for
Linux.
3) Figure out how to make auto* work.
I'm kind of anxious, because as things are right now I can't install
or test the code.
--
David N. Welton
Personal: http://www.dedasys.com/davidw/
Apache Tcl: http://tcl.apache.org/
Free Software: http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: auto*
Posted by "David N. Welton" <da...@dedasys.com>.
[ Oops, sorry for sending this twice, but I wanted the list to be in
on it too. ]
Karl Lehenbauer <ka...@sc.com> writes:
> On Nov 4, 2004, at 2:07 PM, David N. Welton wrote:
> > Sure... now if we could only nail this auto* stuff. The Tcl part
> > we have, more or less, but how do we deal with apxs/apache and
> > merging the two sets of flags and build instructions?
> Here are all the Apache flags that apxs knows about, and their
> values on FreeBSD:
>
> CC -> cc
> TARGET -> httpd
> CFLAGS -> -DLOGIN_CAP -funsigned-char -O -pipe
> -DDOCUMENT_LOCATION="/usr/local/www/data"
> -DDEFAULT_PATH="/bin:/usr/bin:/usr/local/bin" -DHARD_SERVER_LIMIT=512
> SBINDIR -> /usr/local/sbin
> CFLAGS_SHLIB -> -fpic -DSHARED_MODULE
> INCLUDEDIR -> /usr/local/include/apache
> LD_SHLIB -> cc
> LIBEXECDIR -> /usr/local/libexec/apache
> LDFLAGS_SHLIB -> -shared
> SYSCONFDIR -> /usr/local/etc/apache
> LIBS_SHLIB ->
> PREFIX -> /usr/local
> Do you want to try to merge them, or just concatenate them, or what?
The build system in Tcl does try and do some minimal merging.
> Should we use Tcl's build stuff to build librivet.so and
> librivetparser.so and Apache's build stuff to build mod_rivet.so or
> is that even possible.
I think they should have the same flags, basically, well except for
librivetparser being linked against Apache stuff.
> Can we use apxs to actually compile mod_rivet, not just to grab
> variables using it?
We could try, but I have a feeling there is a reason that isn't more
common for all but simple modules.
--
David N. Welton
Personal: http://www.dedasys.com/davidw/
Apache Tcl: http://tcl.apache.org/
Free Software: http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: auto*
Posted by "David N. Welton" <da...@dedasys.com>.
Karl Lehenbauer <ka...@sc.com> writes:
> On Nov 4, 2004, at 10:42 AM, David N. Welton wrote:
> > Karl Lehenbauer <ka...@sc.com> writes:
> >> The Tcl-C-Interface bot suggests that you consider using
> >> Tcl_GetBoolean (interp, var, &rsc->upload_files_to_var);
> > Nope, there is no interpreter... and it looks like it works without
> > one, so I switched over to that in CVS. Thanks!
> You're welcome, David.
> Collaborative development: It produces good software, and it's fun.
Sure... now if we could only nail this auto* stuff. The Tcl part we
have, more or less, but how do we deal with apxs/apache and merging
the two sets of flags and build instructions?
--
David N. Welton
Personal: http://www.dedasys.com/davidw/
Apache Tcl: http://tcl.apache.org/
Free Software: http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: Help with upload to variable ...
Posted by Karl Lehenbauer <ka...@sc.com>.
On Nov 4, 2004, at 10:42 AM, David N. Welton wrote:
> Karl Lehenbauer <ka...@sc.com> writes:
>> The Tcl-C-Interface bot suggests that you consider using
>
>> Tcl_GetBoolean (interp, var, &rsc->upload_files_to_var);
>
> Nope, there is no interpreter... and it looks like it works without
> one, so I switched over to that in CVS. Thanks!
>
You're welcome, David.
Collaborative development: It produces good software, and it's fun.
(Hi Damon.)
Re: Help with upload to variable ...
Posted by Damon Courtney <dc...@hmssoftware.com>.
>>I didn't look to see if you even have a Tcl interpreter at this
>>point, which could be a show-stopper for this plan, although the
>>routine may work with NULL passed for the interp -- I haven't
>>checked that either.
>>
>>
>
>Nope, there is no interpreter... and it looks like it works without
>one, so I switched over to that in CVS. Thanks!
>
>
The only thing the interpreter does is provide a way for the command
to set the error result. Without an interp, we don't get the standard
"it's not a boolean" error message, but we really don't need one anyway. 0-]
D
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: Help with upload to variable ...
Posted by "David N. Welton" <da...@dedasys.com>.
Karl Lehenbauer <ka...@sc.com> writes:
> > Instead of fixing the docs, I decided to make the command a bit
> > more liberal and accept 'yes' and '1', although I guess I should
> > update the docs on the web site...
> The Tcl-C-Interface bot suggests that you consider using
> Tcl_GetBoolean (interp, var, &rsc->upload_files_to_var);
> It accepts "0", "false", "no" or "off" for false, and "1", "true",
> "yes", or "on", for true. It returns TCL_ERROR if there's a problem
> with the conversion, with an error message in the interpreter's
> result.
> I didn't look to see if you even have a Tcl interpreter at this
> point, which could be a show-stopper for this plan, although the
> routine may work with NULL passed for the interp -- I haven't
> checked that either.
Nope, there is no interpreter... and it looks like it works without
one, so I switched over to that in CVS. Thanks!
--
David N. Welton
Personal: http://www.dedasys.com/davidw/
Apache Tcl: http://tcl.apache.org/
Free Software: http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: Help with upload to variable ...
Posted by Karl Lehenbauer <ka...@sc.com>.
On Nov 3, 2004, at 9:22 AM, David N. Welton wrote:
> "Robert S. Sciuk" <ro...@controlq.com> writes:
>
>> else if( STREQU( var, "UploadFilesToVar" ) ) {
>> if( STREQU( val, "on" ) ) {
>> rsc->upload_files_to_var = 1;
>> } else {
>> rsc->upload_files_to_var
>
>> Documentation says setting to "yes" will turn on the option.
>> Instead, you test for the flag "on". This is a simple fix. I
>> changed the httpd.conf line to indicate the "on" setting, and lo and
>> behold the glitch is resolved.
>
>> I would strongly suggest a doc fix is in order.
>
> Oops, you are indeed correct!
>
> Instead of fixing the docs, I decided to make the command a bit more
> liberal and accept 'yes' and '1', although I guess I should update the
> docs on the web site...
>
The Tcl-C-Interface bot suggests that you consider using
Tcl_GetBoolean (interp, var, &rsc->upload_files_to_var);
It accepts "0", "false", "no" or "off" for false, and "1", "true",
"yes", or "on", for true. It returns TCL_ERROR if there's
a problem with the conversion, with an error message in the
interpreter's result.
I didn't look to see if you even have a Tcl interpreter at this point,
which could be a show-stopper for this plan, although the routine may
work with NULL passed for the interp -- I haven't checked that either.
Re: Help with upload to variable ...
Posted by "David N. Welton" <da...@dedasys.com>.
"Robert S. Sciuk" <ro...@controlq.com> writes:
> David,
>
> In thinking about this glitch, I grepped for upload_files_to_var, and
> found the location where it was set ...
>
> else if( STREQU( var, "UploadFilesToVar" ) ) {
> if( STREQU( val, "on" ) ) {
> rsc->upload_files_to_var = 1;
> } else {
> rsc->upload_files_to_var
> Documentation says setting to "yes" will turn on the option.
> Instead, you test for the flag "on". This is a simple fix. I
> changed the httpd.conf line to indicate the "on" setting, and lo and
> behold the glitch is resolved.
> I would strongly suggest a doc fix is in order.
Oops, you are indeed correct!
Instead of fixing the docs, I decided to make the command a bit more
liberal and accept 'yes' and '1', although I guess I should update the
docs on the web site...
--
David N. Welton
Personal: http://www.dedasys.com/davidw/
Apache Tcl: http://tcl.apache.org/
Free Software: http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: Help with upload to variable ...
Posted by "Robert S. Sciuk" <ro...@controlq.com>.
David,
In thinking about this glitch, I grepped for upload_files_to_var, and
found the location where it was set ...
else if( STREQU( var, "UploadFilesToVar" ) ) {
if( STREQU( val, "on" ) ) {
rsc->upload_files_to_var = 1;
} else {
rsc->upload_files_to_var
Documentation says setting to "yes" will turn on the option. Instead, you
test for the flag "on". This is a simple fix. I changed the httpd.conf
line to indicate the "on" setting, and lo and behold the glitch is
resolved.
I would strongly suggest a doc fix is in order.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
Robert S. Sciuk http://www.controlq.com 259 Simcoe St. S.
Control-Q Research tel: 905.576.8028 Oshawa, Ont.
rob@controlq.com fax: 905.576.8386 Canada, L1H 4H3
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: Help with upload to variable ...
Posted by "Robert S. Sciuk" <ro...@controlq.com>.
David,
I installed the following patch just before the return statment in
the appropriate routine ... and then did a ./make.tcl all;
./make.tcl install, (with apache shut down), restarted and no joy.
/* rss fix suggested by David Welton to resolve problems with overrides
with respect to upload file to tcl variable ... 2004.11.03
*/
rsc->upload_files_to_var = overrides->upload_files_to_var ?
overrides->upload_files_to_var : base->upload_files_to_var;
/* rss 2004.11.03 */
/* objCacheList is set up later. */
/* objCache is set up later. */
/* outchannel is set up later. */
return rsc;
The overrides thing might be a red herring, since if I set the directive
globally, and NOT virtually, the same thing happens. I've also tried
changing the order of the directives, and commenting out the
uploadDirectory directive ... no change .. it just does not seem to parse
the "toVars" directive ... period.
On Wed, 3 Nov 2004, David N. Welton wrote:
> Date: 03 Nov 2004 12:20:51 +0100
> From: David N. Welton <da...@dedasys.com>
> To: rob@controlq.com
> Cc: Rivet Developer Digest <ri...@tcl.apache.org>
> Subject: Re: Help with upload to variable ...
>
> "Robert S. Sciuk" <ro...@controlq.com> writes:
>
> > I've got the following lines in my httpd.conf file:
>
> > LoadModule rivet_module /usr/local/apache/libexec/mod_rivet.so
> > RivetServerConf SeperateVirtualInterps yes
> > RivetServerConf UploadDirectory /usr/local/apache/Upload
> > RivetServerConf UploadMaxSize 1024000
> > RivetServerConf UploadFilesToVar yes
>
> > I have added these lines to both the global section and the
> > <virtual> section of the relevant httpd.conf file, to no avail.
>
> > and yet I get an error when I attempt to upload into a variable:
>
> > RivetServerConf UploadFilesToVar is not set
> > while executing
> > "upload data Xyzzy"
> > (in namespace eval "::request" script line 20)
> > invoked from within
> > "namespace eval request {
> > puts -nonewline ""
>
>
> > I can upload and save the file, no problem, yet the server does not see my
> > directive for some reason. I have stopped and restarted apache several
> > times, and no change occurs with respect to the UpLoadToVars directive!!
>
> > I'm executing the following Rivet code ...
>
> > <?
>
> > set my_blob [upload data Xyzzy]
> > qht::text "my_blob contains [string length $my_blob] bytes"
>
> > # upload save Xyzzy [ format "%s/%s" $UP_DIR [upload filename Xyzzy] ]
> > # qht::text "Saved file [upload filename Xyzzy] ([upload size Xyzzy]
> > bytes) to server"
>
> > ?>
>
>
> Hrm... I've been looking through the code. Why don't you try adding
> this:
>
> rsc->upload_files_to_var = overrides->upload_files_to_var ?
> overrides->upload_files_to_var : base->upload_files_to_var;
>
> to Rivet_MergeConfig(pool *p, void *basev, void *overridesv)
> somewhere.
>
> Recompile, install and tell me if the problem goes away...
>
>
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
Robert S. Sciuk http://www.controlq.com 259 Simcoe St. S.
Control-Q Research tel: 905.576.8028 Oshawa, Ont.
rob@controlq.com fax: 905.576.8386 Canada, L1H 4H3
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: Help with upload to variable ...
Posted by "David N. Welton" <da...@dedasys.com>.
"Robert S. Sciuk" <ro...@controlq.com> writes:
> I've got the following lines in my httpd.conf file:
> LoadModule rivet_module /usr/local/apache/libexec/mod_rivet.so
> RivetServerConf SeperateVirtualInterps yes
> RivetServerConf UploadDirectory /usr/local/apache/Upload
> RivetServerConf UploadMaxSize 1024000
> RivetServerConf UploadFilesToVar yes
> I have added these lines to both the global section and the
> <virtual> section of the relevant httpd.conf file, to no avail.
> and yet I get an error when I attempt to upload into a variable:
> RivetServerConf UploadFilesToVar is not set
> while executing
> "upload data Xyzzy"
> (in namespace eval "::request" script line 20)
> invoked from within
> "namespace eval request {
> puts -nonewline ""
> I can upload and save the file, no problem, yet the server does not see my
> directive for some reason. I have stopped and restarted apache several
> times, and no change occurs with respect to the UpLoadToVars directive!!
> I'm executing the following Rivet code ...
> <?
> set my_blob [upload data Xyzzy]
> qht::text "my_blob contains [string length $my_blob] bytes"
> # upload save Xyzzy [ format "%s/%s" $UP_DIR [upload filename Xyzzy] ]
> # qht::text "Saved file [upload filename Xyzzy] ([upload size Xyzzy]
> bytes) to server"
> ?>
Hrm... I've been looking through the code. Why don't you try adding
this:
rsc->upload_files_to_var = overrides->upload_files_to_var ?
overrides->upload_files_to_var : base->upload_files_to_var;
to Rivet_MergeConfig(pool *p, void *basev, void *overridesv)
somewhere.
Recompile, install and tell me if the problem goes away...
--
David N. Welton
Personal: http://www.dedasys.com/davidw/
Apache Tcl: http://tcl.apache.org/
Free Software: http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org