On 01/09/2007 03:40 PM, Slawomir Orlowski wrote:
Hello everybody,
I have Linux Enterprise v4 apache 2.0.58 and perl 5.8.5.
I have one web page domain1 (users are recognized by domain1cookie) I would
like to move my web page to new domain2 and I would like users to be
recognized by domain2cookie (which would have the some value as
domain1cookie just different name).
I don't think that is possible. Cookies are restricted to the domain of
the server that creates them. As you found out, you'll have to use a
query string (a GET parameter).
Index.cgi script1 on domain1:
"
#!/usr/bin/perl
require "cgi-lib.pl";
I've never used cgi-lib.pl, but it sounds like very old, outdated and
perhaps buggy software. I suggest that you either use CGI.pm's
compatibility mode for 'cgi-lib.pl' or not use 'cgi-lib.pl' at all.
use DBI;
use CGI qw(:standard);
This imports the CGI functions--but you never use them.
And don't forget these:
use strict;
use warnings;
Read these:
perldoc strict
perldoc warnings;
my $cgi = new CGI;
If you use the object-oriented form of CGI usage, you don't need to
import the :standard functions.
my $cookie;
my $domain2path = http://www.domain2.com/index.cgi;
[...]
I have for test purpose sent cookie in GET
(*) print $cgi->redirect( -location => $domain2path?cookie=$cookie )
[...]
You got it. That the correct way to pass this value between different
domains. A post request would also do but is unnecessary.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/