You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Edgardo Szulsztein <ed...@netscape.net> on 2000/05/19 20:44:17 UTC
Questions about Apache::Session
Hi
I've used Embeded Perl for a while, and now I'm trying to use the session
funcionality. I tried to use postgresql as a database server, but I had no
luck. My apache configuration file looks like:
PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:Pg:dbname=session
UserName=xxx"
When I try to acces a page I get the following error:
The server encountered an internal error or misconfiguration and was unable to
complete your request.
Please contact the server administrator, root@morticia.pertsrl.com.ar and
inform them of the time the error occurred, and anything
you might have done that may have caused the error.
[27900]ERR: 24: Line 15: Error in Perl code: DBD::Pg::st execute failed:
ERROR: parser: parse error at or near ""
Apache/1.3.12 (Unix) mod_perl/1.22 HTML::Embperl 1.3b2 [Fri May 19 18:43:57
2000]
HTTP/1.1 500 Internal Server Error Date: Fri, 19 May 2000 21:43:57 GMT Server:
Apache/1.3.12 (Unix) mod_perl/1.22
Connection: close Content-Type: text/html; charset=iso-8859-1
Internal Server Error
How could I fix it?
Then, I tried to use FileStore, and it worked fine. However, it stores the
sessions files in the /tmp directory. How could I change the location of the
sessions file in the httpd.conf file?
Any help to solve this problems will be very appreciated
Thanks in advance
Edgardo Szulsztein
edgardo@dc.uba.ar
____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.
Re: Questions about Apache::Session
Posted by "Bruce W. Hoylman" <bh...@advtech.uswest.com>.
>>>>> "Edgardo" == Edgardo Szulsztein <ed...@netscape.net> writes:
Edgardo> Then, I tried to use FileStore, and it worked
Edgardo> fine. However, it stores the sessions files in the /tmp
Edgardo> directory. How could I change the location of the sessions
Edgardo> file in the httpd.conf file?
Good move. Get it working via FileStore, then get the database version
of your session handling going.
As for the session file storage, set the SESSION_FILE_DIRECTORY
variable, and/or use a 'EMBPERL_SESSION_ARGS "Directory=/web/sessions"'.
I threw both into my httpd.conf, which looks like this by the way:
PerlSetEnv EMBPERL_SESSION_CLASS Embperl
PerlSetEnv SESSION_FILE_DIRECTORY /web/sessions
PerlSetEnv EMBPERL_SESSION_CLASSES "FileStore NullLocker"
PerlSetEnv EMBPERL_SESSION_ARGS "Directory=/web/sessions"
PerlSetEnv EMBPERL_COOKIE_PATH "/"
<FilesMatch ".*\.e(pl|html)$">
PerlSetEnv EMBPERL_OPTIONS 16535
SetHandler perl-script
PerlHandler HTML::Embperl
Options ExecCGI
PerlSendHeader Off
</FilesMatch>
YMMV.
Peace.