Hi, I'd like to start learning and working with CGI::Session. My (local) installation of the module went fine, but as soon as I want to create a session, I get a '500 Internal Server Error'. Here is a simple test code:

#!/usr/bin/perl use lib "/www/docs/homes/theissen/scr/perlmods/perllib/"; use CGI; use CGI::Session; $q = new CGI; $session = new CGI::Session(undef,undef,{Directory=>"/www/docs/homes/t +heissen/scr/session/tmp"}); #$sid = $session->id(); print $q->header(), $q->start_html('Hi'), $q->h1('hi'), qq[session id: $sid\n], $q->end_html;

When I uncomment the line for session creation ('$session = new...'), the script works (of course, not doing anything with the session, and $sid not being initialized), i.e. the module itself is found. The directory in which the test script is in is cgi enabled (I run ordinary cgi scripts there). On installing cgi::session, I thought I better install it within the cgi enabled area, too.

When I run the script as such from the command line, I don't get any errors. I do get a session id ($sid, of course after uncommenting this line). So I'm pretty lost in figuring what is going wrong. Looks like the problem is not my cgi::session installation, but some server settings?

Any wisdom welcome

cheers

armin

In reply to get CGI::Session working by armint

Title:
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, details, 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, summary, 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.