Hi, list<br>I got one issue when I use the plugin CGI::Application::Plugin:<div id="1ep2" class="ArwC7c ckChnd">:Session<br><br>I have a parent package(Class), named &quot;FWebApp&quot;,<br>and this class extends the CGI::Application.<br>
I did some setting work in the method cgiapp_init<br>
<br>like this:<br><br>sub cgiapp_init {<br>&nbsp;&nbsp;&nbsp; my $this = shift;<br><br>&nbsp;&nbsp;&nbsp; #get the database configuration<br>&nbsp;&nbsp;&nbsp; my $datasource = $this-&gt;cfg(&#39;data_source&#39;);<br>&nbsp;&nbsp;&nbsp; my $data_user = $this-&gt;cfg(&#39;data_username&#39;);<br>

&nbsp;&nbsp;&nbsp; my $data_auth = $this-&gt;cfg(&#39;data_userauth&#39;);<br>&nbsp;&nbsp;&nbsp; my $attr = $this-&gt;cfg(&#39;data_attr&#39;);<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; #configuration the Database<br>&nbsp;&nbsp;&nbsp; $this-&gt;dbh_config($datasource,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $data_user,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $data_auth,&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $attr);<br>&nbsp;&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; #configuration the Session<br>&nbsp;&nbsp;&nbsp; $this-&gt;session_config(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CGI_SESSION_OPTIONS =&gt; [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;driver:mysql&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;query,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Handle=&gt;$this-&gt;dbh<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }],<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COOKIE_PARAMS =&gt; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -domain =&gt; $this-&gt;cfg(&#39;site_domain&#39;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -expires=&gt;&#39;+40m&#39;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -path=&gt;&#39;/&#39;,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -secure=&gt;1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },<br><br>&nbsp;&nbsp;&nbsp; );<br><br>&nbsp;&nbsp;&nbsp; #set the template path<br>&nbsp;&nbsp;&nbsp; $this-&gt;tmpl_path($this-&gt;cfg(&#39;template_path&#39;));<br><br><br><br>and the session configuration look like is ok.<br><br>

and so, just now, i assume I have a action: it is register .<br>so, I will write a new module named:<br><br>package FWebApp::Register;<br>=head1&nbsp; NAME<br><br>FWebApp::Register - show the register page<br><br>=head1&nbsp; SYNOPSIS<br>

<br>extends the Class FWebApp, <br>show the register page<br><br>=cut<br>use strict;<br>use warnings;<br>use base qw/FWebApp/;<br>use CGI::Application::Plugin::AutoRunmode;<br>use CGI::Application::Plugin::DBH qw/dbh_config dbh/;<br>

use CGI::Application::Plugin::ConfigAuto qw/cfg/;<br>use CGI::Application::Plugin::Session;<br><br><br># the default requirement mode<br># show the register page.<br>sub show_register: StartRunmode {<br>&nbsp;&nbsp;&nbsp; my $this = shift;<br>

<br>&nbsp;&nbsp;&nbsp; # if that user had login, we will jump to home page<br>&nbsp;&nbsp;&nbsp; my $template = undef;<br>&nbsp;&nbsp;&nbsp; if ( $this-&gt;session-&gt;param(&#39;loginname&#39;) ) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $template = $this-&gt;load_tmpl(&#39;had_login.html&#39;);<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $template-&gt;param(&#39;HOMEPAGE&#39;, &#39;index.html&#39;);<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $template = $this-&gt;load_tmpl(&#39;register.html&#39;);<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; return $template-&gt;output;<br>

<br>}<br><br><br><br><br>1;<br><br><br>it is extends FWebApp, but when I had prepared a script:<br>like this:<br>#!/usr/local/bin/perl -w -T<br>use strict;<br>use lib qw(. ../lib);<br>use CGI::Application::Plugin::ConfigAuto;<br>

use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;<br>use FWebApp::Register;<br><br>my $app = FWebApp::Register-&gt;new(<br>&nbsp;&nbsp;&nbsp; PARAMS =&gt; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cfg_file =&gt; &#39;config.pl&#39; } );<br><br>$app-&gt;run;<br>
<br>
<br><u><b>when I refresh that script, we always got the difference session id, why?</b></u><br><br><br>thanks<br><font color="#888888"><br><br>Mike.G</font></div>