in reply to get CGI::Session working

Hi, thanks for your comments. In fact, the tmp file directory would have been a factor - I moved that to a directory where I know it works since I use it in connection with other (working) cgi scripts (where clients upload files). The permissions are fine, too.

Since I have no superuser privileges, I had to install CGI::Session locally. So it shouldn't matter where locally...

I did had a look at the server error log, and there it says:

Premature end of script headers: test.cgi Can't locate object method "generate_id" via package "CGI::Session::ID +::" at /www/docs/homes/theissen/scr/perlmods/perllib//CGI/Session.pm +line 75.

So, it doesn't know of the definition of generate_id, which is in Session/ID/incr.pm and static.pm? How can that be? Any way to force Session.pm to look there? I tried 'use lib...' in every .pm file, but with no success.

Thanks for all the hints

Replies are listed 'Best First'.
Re^2: get CGI::Session working
by Herkum (Parson) on Jun 27, 2007 at 19:25 UTC

    When you 'use lib', it is just appending that directory to the path where it will look for Perl modules.

    I don't know if this makes a difference but can you remove that trailing / from the directory path?

    Also, I wonder if the script is having a problem trying to create the file and is giving you an error.

    CGI::Session is a great tool but it can be a pain to get working sometimes.