in reply to Re^6: Cookie->fetch problem
in thread Cookie->fetch problem

Hi:

If I open the file http://www.jala-mi.org/httpsdocs/index.html I see the cookie.

If I open www.jala-mi.org I don't see the cookie.

If I open https://www.jala-mi.org/ I don't see the cookie

If I open https://www.jala-mi.org/httpsdocs/index.html I see the cookie

This is after I again changed path path=/httpsdocs/cgi-bin; domain=.www.jala-mi.org; Secure

None of these executions from the directory where the cookie was showing produced a $sid from the cookie in the sub routine using code suggested

As for posting code, I have repeatedly seen posters admonished for posting too much code.

I have not seen anyplace to post images/code.

Replies are listed 'Best First'.
Re^8: Cookie->fetch problem
by tultalk (Monk) on Mar 12, 2017 at 04:58 UTC

    Hi: Changed path to / and cookie now shows everywhere

    Still is not detected in sub Problem has got to be isolated to this block of code.

    sub GetUserSessionCookie { warn("Entered GetUserSessionCookie Sessionname: '$sessionname'"); + my $sid = 0; my %cookies; my $id=0; if ($cookies{'CGISESSID'}) { $id = $cookies{'CGISESSID'}->value; $sid = $id; } warn($sid); # $sid = 0; #for testing the rest of program. If I put in valid S +ID from #cookie recognizes user as logged on. return $sid; }

      what happened to

      my %cookies = CGI::Cookie->fetch;

        It got lost in the late night shuffle. The sub was filled with failed parts commented out and before I sent to you I deleted the commented out parts and got that line accidentally.

        Thanks for all your help and hopefully I won't hit another idiotic roadblock

        Error log showing success:

        [Sun Mar 12 07:38:57 2017] manage_users.cgi: Entered GetUserSessionCoo +kie Sessionname: 'CGISESSID' at /home/jalamior/www/httpsdocs/cgi-bin/ +lib/perl/manageusers.pm line 670. ae885bb74a4e2ff181037c974e2365ee at /home/jalamior/www/httpsdocs/cgi-b +in/lib/perl/manageusers.pm line 685. [Sun Mar 12 07:38:57 2017] manage_users.cgi: ae885bb74a4e2ff181037c974 +e2365ee at /home/jalamior/www/httpsdocs/cgi-bin/lib/perl/manageusers. +pm line 685. ProcessLoginRequest Query: 'CGI=HASH(0x1057390)' at /home/jalamior/www +/httpsdocs/cgi-bin/lib/perl/manageusers.pm line 223.

      tultalk, this is ridiculous

        No. Stumbling around after a very long and tiring day doing this, collecting rent, working on a bathroom and getting ready for spring on the farm.

        Things are looking up this bright morning.

        Thanks for all your help. This program was working reliably until 2012 or 2013 when the host switched from plesk to cPanel and a later version of perl.

        Not only did they say say they could not fix it, they did not have the programmers and it was my problem.