I think something is wrong. Please check:<br><br>I have two apps wc and qy:<br><br><b> WC:</b><br><br>debian:/tmp/wc# /etc/init.d/apache2 start<br>Starting web server: apache2.<br>debian:/tmp/wc# ls<br>session_data<br>debian:/tmp/wc# /etc/init.d/apache2 stop<br>
Stopping web server: apache2 ... waiting .<br>debian:/tmp/wc# ls<br>session_data<br><br><i><b>The session_data is there and user needn't login again.</b></i><br><br>use Catalyst qw/-Debug<br> ConfigLoader<br>
Static::Simple<br><br> StackTrace<br> Authentication<br><br> Session<br> Session::Store::FastMmap<br> Session::State::Cookie/;<br>
<br><authentication><br> default_realm dbic<br> <realms><br> <dbic><br> <credential><br> # Note: this first definition would be the same as setting<br> # __PACKAGE__->config->{authentication}->{realms}->{dbic}<br>
# ->{credential} = 'Password' in lib/MyApp.pm<br> #<br> # Specify that we are going to do password-based auth<br> class Password<br> # This is the name of the field in the users table with the<br>
# password stored in it<br> password_field password<br> # Switch to more secure hashed passwords <br> password_type hashed<br> # Use the MD5 hashing algorithm<br>
password_hash_type MD5<br> </credential><br> <store><br> # Use DBIC to retrieve username, password & role information<br><b> <i> class DBIx::Class</i></b><br>
# This is the model object created by Catalyst::Model::DBIC<br> # from your schema (you created 'MyApp::Schema::Result::User'<br> # but as the Catalyst startup debug messages show, it was<br>
# loaded as 'MyApp::Model::DB::Users').<br> # NOTE: Omit 'MyApp::Model' here just as you would when using<br> # '$c->model("DB::Users)'<br> user_class WCDB::WcUser<br>
</store><br> </dbic><br> </realms><br></authentication><br><br><b> QY:</b><br><br>debian:/tmp/qy# /etc/init.d/apache2 start<br>
Starting web server: apache2.<br>
debian:/tmp/qy# ls<br>
session_data<br>
debian:/tmp/qy# /etc/init.d/apache2 stop<br>
Stopping web server: apache2 ... waiting .<br>
debian:/tmp/qy# ls<br>
debian:/tmp/qy#<br>
<i><br>
<b>The session_data is cleared out and user must login again.<br><br></b></i>use Catalyst qw/-Debug<br>
ConfigLoader::MultiState<br>
Static::Simple<br>
<br>
StackTrace<br>
Authentication<br>
<br>
Session<br>
Session::Store::FastMmap<br>
Session::State::URI<br>
Session::State::Cookie/;<br>
<br>$default_realm = 'default';<br>$realms = {<br> 'default' => {<br> 'credential' => {<br> 'class' => 'Password',<br> 'password_field' => 'password',<br>
'password_type' => 'hashed',<br> 'password_hash_type' => 'MD5',<br> },<br> 'store' => {<br><b> 'class' => 'DBI',</b><br>
'user_table' => 'qy_user',<br> 'user_key' => 'id',<br> 'user_name' => 'username',<br> 'user_password' => 'password',<br>
},<br> },<br>};<br><br>$use_session = 1;<br><br><br><div class="gmail_quote">On Sat, Apr 18, 2009 at 3:36 PM, Devin Austin <span dir="ltr"><<a href="mailto:devin.austin@gmail.com">devin.austin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If your data needs to be more persistent save it in the database<br><br></blockquote></div><br>
<br>-- <br>Jack Malloy<br>