Don't use MemorySession in the example as it will only work on Windows
and will not work on multi process MPMs on UNIX as each process will
have its own session database instance in its local memory. The MemorySession
also will not work across Python interpreter instances.

Thus, suggest start out by allowing default session type for platform to be used.
Session types can be talked about later or in a separate example.

Graham

On 02/12/2006, at 10:31 AM, Apache Wiki wrote:

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Mod_python Wiki" for change notification.

The following page has been changed by MartinStoufer:
http://wiki.apache.org/mod_python/Session_use_with_classes

The comment on the change is:
A good start.

---------------------------------------------------------------------- --------

Once you understand this framework, you can then add your own content.

- First, lets augment a directory element in the ''httpd.conf'' to enable session support. + First, lets augment a directory element in the ''httpd.conf'' to enable both the Publisher model and session support.

+ {{{
-     <Directory /usr/local/apache2/htdocs/DomProdLib>
+ <Directory /usr/local/apache2/htdocs/DomProdLib>
-         AddHandler mod_python .py
+     AddHandler mod_python .py
-         PythonHandler mod_python.publisher
+     PythonHandler mod_python.publisher
-         PythonOption session MemorySession
+     PythonOption session MemorySession
-     </Directory>
+ </Directory>
+ }}}

+ Here we see the '''[http://modpython.org/live/current/doc-html/ dir-handlers-ph.html PythonHandler]''' using the publisher object. Utilizing and extending this is described in [http://modpython.org/ live/current/doc-html/hand-pub.html Section 6.1] of the mod_python documentation.
+
+ We also see a new '''[http://modpython.org/live/current/doc-html/ dir-other-po.html PythonOption]''' added calling for the ''session'' option to be set with the ''[http://modpython.org/live/ current/doc-html/pyapi-sess.html MemorySession]'' value. Other values are available and are defined in [http://modpython.org/live/ current/doc-html/pyapi-sess.html Section 4.5] of the mod_python documentation.
+
+ === The rest is forthcoming in short order ===
  ----
  CategoryExamples

Reply via email to