Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Yes, yes, you point to trivial programs that run from the commandline, but those specific scripts will not work as CGI programs as they do not write the usual suite of headers, or valid HTML, to standard out. The fact is that in a number of cases, I have found the behaviour of certain code snippets differing based on whether executed from a commandline script or from within a CGI script. This is why I included all that was necessary to have apache use perl to create the output page, and also why code of the sort you recommend can not answer the question. The code I posted is trivially simple (about 60 lines in the package and about 30 in the cgi script, hardly qualifies as much unrelated code - and in fact most of the code in the pl script is what is necessary to create a valid CGI script - and yes, you need not look at the code in the package unless you're interested in error handling in that context - but it makes the output of the CGI script more interesting), but it is sufficient to provide a trivially simple context in which the value returned by is_expired is wrong. The code in the posts you provided illustrates how is_expired is supposed to work, and that is something I already understood. What I did not understand, and the specific question you ignored, is why it did not work that way when applied in a more realistic context.

To see the code I posted in action, all that need be done is put it in the cgi directory for your web browser, request the page using your favourite browser, and then request once, in less than 5 minutes, to see what ought to happen when the session ought not have timed out, and then wait a little over 5 minutes (something that the impatient can adjust without difficulty) to see what happens when the session ought to have expired.

And yes, I am familiar with the notion of small, self contained, programs that illustrate the problem, and the code I posted IS small, self contained, and shows the problem where the code you recommend, while small and self contained, is not adequate to illustrate the problem because they would have to be singificantly altered in order to be executed as a CGI script. The relevant criterion that makes the code I posted applicable is that it shows the problem. Now, as I do not know why the problem exists, it could be anything from some peculiarity in the Activestate distributions, or running it on Windows, or anything else that I can't yet imagine, but information that will tell me what is the cause is what is needed here; nothing else.

Do you have any information that might actually address the real problem?



In reply to Re^2: Problems getting session management to work: is_expired seems to lie to me by ted.byers
in thread Problems getting session management to work: is_expired seems to lie to me by ted.byers

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Discipulus]: good morning choroba! the eu-crew is complete! ;=)
    mxb waves

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (10)
    As of 2018-05-21 08:08 GMT
    Find Nodes?
      Voting Booth?