[ic] use get_url perl error ....

Stefano Kerschbaumer - Interline S.r.l. interchange-users@icdevgroup.org
Fri Aug 30 10:45:02 2002


> At 10:52 AM 8/29/2002 +0200, you wrote:
> >Sorry I don't understand ... I have write your code for UserTag get-url
and
> >this is the error in the log file:
> >
> >- - - [29/August/2002:10:43:37 +0200] - - STOP server (6597) on signal
TERM
> >- - - [29/August/2002:10:43:41 +0200] - - Interchange V4.8.5
> >- - - [29/August/2002:10:43:42 +0200] - - START server (8186) (UNIX)
> >- - - [29/August/2002:10:43:43 +0200] - - START server (8290) (UNIX)
> >192.168.1.53 xZhhGpdB:192.168.1.53 - [29/August/2002:10:43:47 +0200] test
> >/cgi-
> >bin/test/ord/payment.html Safe: require trapped by operation mask
> >at /usr/lib/perl5/5.6.1/i386-linux/IO/Socket.pm line 9.
> > > Compilation failed in require at
> > /usr/lib/perl5/site_perl/5.6.0/LWP/Simple.pm
> >line 296.
> > >
> > >
> > >    return $Tag->get_url( "http://www.virgilio.it/" );
> > >
> > >
> >
> >The error in the Socket.pm is this:
> >
> ># IO::Socket.pm
> >#
> ># Copyright (c) 1997-8 Graham Barr <gbarr@pobox.com>. All rights
reserved.
> ># This program is free software; you can redistribute it and/or
> ># modify it under the same terms as Perl itself.
> >
> >package IO::Socket;
> >
> >require 5.005_64; << This is the error
> >
> >If I use the original code I don't have error in the log file but I don't
> >view
> >the page wwww.virgilio.it
> >
> >If I use [get-url http://www.virgilio.it] is OK !!!
> >
> >
> >Sorry for the English ... I don't work good with linux and this is my
first e-
> >commerce ...
> >
> >Saluti Stefano
>
> <interchange-users guidelines>
>
> -- Contextual quoting is preferred, i.e.
>
>                  Quoting user1 (<user1@somedomain.com>):
>                  > Some limited text that will give context.
>                  >
>
>                  Your reply.
>
>      versus
>
>                  Your reply, lazily put at the top.
>
>                  Quoting user1 (<user1@somedomain.com>):
>                  > The whole big blob of the previous posts, including
>                  > signatures and all
>
>          Many of the list readers stop following a thread the moment
>          this lazy quoting method is used.  They figure that if you
>          can't take half a minute of your time to save multiple
>          minutes of the readers' time, you don't deserve replies.
>
> </interchange-users guidelines>
>
> For more information, see this thread:
>
>
http://www.icdevgroup.org/pipermail/interchange-users/2002-August/024070.htm
l
>
> The workaround I chose there was to wrap the operation in a catalog-level
> usertag.  Another workaround is to use calc instead:
>
> [calc]
>          return q{[get-url http://www.virgilio.it]};
> [/calc]
>
> Cheers,
>
> /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
> | Dan Browning, Kavod Technologies      <dan.browning@kavod.com> |
> | (360) 882-7872 x7, 6700 NE 162nd Ave, Suite 210, Vancouver, WA |
> \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
> The reward of a thing well done is to have done it.
>                  -- Emerson
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>


OK !!! But I have another problem ...


This is my script:

[perl ]
    my $url_prepare =
'http://areatest.shopladev.it/400006-Hash/Hash.asp?StoreID=400006&CF__CustOr
derNumber=BA001&Name=Articoli&UniqueID=001&Price=123.45&Quantity=1&DiscountA
=&DiscountTypeA=';

#Call a url to load an hash code

 my $hash = "[get-url $url_prepare]";


   my $url_make =
'http://areatest.shopladev.it/Secur\@LightServer/MakeDO.asp?Name=Articoli&Un
iqueID=001&Type=tangible&OfferURL=http://catalogo.bottegaalpina.com&VatFlag=
0&VatRate=0.2&Price=123.45&Currency=EUR&Quantity=1&Locale=it-IT-SL&StoreID=4
00006&CF__CustOrderNumber=BA001&CF__CustReceipt=http://catalogo.bottegaalpin
a.com&HashFile='.$hash;   #Use the hash code in this call

#This out put is the correct hash code and the correct url_make

   my $output = $hash.$url_make. "[get-url $url_make]";

  return $output;

[/perl]

BUT in server log :

GET /Secur@LightServer/MakeDO.asp
Name=Articoli&UniqueID=001&Type=tangible&OfferURL=http://catalogo.bottegaalp
ina.com&VatFlag=0&VatRate=0.2&Price=123.45&Currency=EUR&Quantity=1&Locale=it
-IT-SL&StoreID=400006&CF__CustOrderNumber=BA001&CF__CustReceipt=http://catal
ogo.bottegaalpina.com&HashFile=%5Bget-url%20http://areatest.shopladev.it/400
006-Hash/Hash.asp?StoreID=400006&CF__CustOrderNumber=BA001&Name=Articoli&Uni
queID=001&Price=123.45&Quantity=1&DiscountA=&DiscountTypeA=|104|800a01c9|Thi
s_key_is_already_associated_with_an_element_of_this_collection 500 0 4845
592 406 HTTP/1.1 LWP::Simple/5.65 - -

BECAUSE the $url_make are recursive rewrite

Saluti Stefano