[ic] Problem with set/check_file_acl (?)

Mike Heins interchange-users@icdevgroup.org
Wed Jul 2 18:27:00 EDT 2003

Quoting Gabriel Cooper (gabriel@inanutshell.us):
> I am trying to set up a store with downloadable
> documents and have run into a rather simple roadblock.
> When someone buys a downloadable document and arrive
> at receipt.html there's a link to "Download Now!".
> When the click the link they /always/ receive a 404 error
> generated by deliver.html (the page that delivers the
> document).
> I have narrowed the problem all the way down to the
> set/get of an authorization variable. receipt.html
> sets the variable, deliver.html checks it and if the
> check returns true then you get your document.
> Unfortunately the "check_file_acl" userdb function is
> always returning *nothing*. Not 0 (false), nor 1 (true).
> I'm stumped and don't know what's wrong. The code
> that sets it as well as the code that checks it is
> straight from the normal stock implementation of the
> Interchange foundation store (AFAIK) so I really don't
> see why this isn't working.
> below is the set/check code from the two pages:
> In receipt.html:

Looks like this:

>       [userdb
>         function=set_file_acl
>         mode="expire 7 days"
>         location="[item-code]"
>       ]

Doesn't match this:

> In deliver.html:
> [seti authorized][userdb
>   function=check_file_acl
>   location="[scratch deliverable]"
>   mode=expire
> ][/seti]

Unless [scratch deliverable] is equal to the SKU of the ordered item,
it will not authenticate.

If you do a SQL query

	select file_acl from userdb;

you will see what is actually set for the location for all orders
with downloads.

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer

More information about the interchange-users mailing list