[ic] softgoods -- Thanks Mike H.

José Mª Revuelto interchange-users@interchange.redhat.com
Thu May 16 11:20:01 2002


Hi,

>De: interchange-users-admin@interchange.redhat.com en nombre de Paul
>Jordan [paul@gishnetwork.com]
>Enviado: lunes, 04 de marzo de 2002 20:15
>Para: interchange-users@interchange.redhat.com
>Asunto: RE: [ic] softgoods -- Thanks Mike H.
>
>Quoting Mike Heins
>> If you expect to sell lots of softgoods, the best thing to do is make
>> your enabling procedure provide a symlinked directory for a separate
>> HTTP download.
>>
>> It can be as simple as:
>>
>> UserTag enable-download Order resource
>> UserTag enable-download addAttr
>> UserTag enable-download Routine <<EOR
>> sub {
>> 	my ($resource, $opt) = @_;
>>
>>	my $docroot = $opt->{document_root} || $::Variable->{DOCROOT};
>> 	my $dl_dir  = $opt->{base_dir} || 'tmp_download';
>> 	my $server  = $opt->{server}   || $::Variable->{SERVER_NAME};
[bla, bla, bla...]
>>
>>
>
>Thanks for this great code Mike. I have decided to try and implement this
>for the site.
>
>I put this usertag in catalog.cfg. I am not that good with perl, but I
think
>I understand what is going on here. However
>-----------------------
>{SERVER_NAME} -> {www.imagemogul.com}
>
>{DOCROOT} -> {downloads}--   I take it I should make a folder called like
>"downloads" that is in my www directory
>
>{tmp_download} -- Is this a folder called tmp_download, that will be
created
>on the fly, inside of {downloads}
>-----------------------

It is not working for me. I´ve taken two hours trying all posible
combinations but I can´t make it work. Where it is supposed to be the
{downloads} directory? Under the web directory /var/www? In my catalog root?
Do I have to create it first or not?

All I get is a permission error when processing the page and this in my
error.log:

"localhost.localdomain bxVkzoVa:localhost.localdomain -
[16/mayo/2002:16:33:16 +0200] reports /cgi-bin/reports/process.html Runtime
error: mkdir /tmp_download: Permiso denegado at (eval 100) line 18"

I´ve tried many things with permissions but nothing make it work. Can anyone
help me?

Thank you.

José Mª