[fpc-pascal] Backport of Bugfix 0031517 possible

2018-03-22 Thread Andreas Frieß

Hello,

it looks the fix Bug 0031517 is more and more visible, if you compile an 
actual stable Lazarus with the actual stable fpc.


You see with a Lazarus with more packages, the Error - No memory left - 
rises. See e.g. the thread 
http://forum.lazarus.freepascal.org/index.php/topic,40351.0.html about 
this.


My question is, is it possible to make a backport of this fix? Should i 
reopen the Bugreport oder create a new one ?


The soloution is now one year in trunk and i have seen no problems with it.

Andreas

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] [FCL-WEB] Multiple Modules - On Session

2018-03-22 Thread Michael Van Canneyt



On Wed, 21 Mar 2018, leledumbo via fpc-pascal wrote:


It seems that session management create one separate session by each module


That's right but should be OK, as the session is created based on cookie,
which if already exists, will be loaded instead of created. If memory serves
right, I remember you should set one or a few of these:
* fphttp.SessionFactory.SessionCookie
* fphttp.SessionFactory.SessionCookiePath

optionally, to easily check the created session files, you might want to
also set:
* (fphttp.SessionFactory as iniwebsession.TIniSessionFactory).SessionDir


A cookie is associated with a URL path. That means that
http://mysite/a/b
will by default have a different cookie then
http://mysite/a/c

In order to share a cookie between modules, you must set SessionCookiePath
at the start of the program:

SessionFactory.SessionCookiePath:='/';

This will emit a cookie that has / as the path.

See also the fixed example at:
https://bugs.freepascal.org/view.php?id=33470

Michael.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal