Auth component doesn't set session variables !

2011-03-31 Thread damien d
Hi,

I have trouble with the Auth component.

I try something really simple :
 - I create a user db (with name,password field)
 - I use a appcontroler with this code :

var $components = array(Session,Auth);
function beforeFilter() {
$this-Auth-fields = array('username' = 'name',
'password' = 'password');
$this-Auth-loginAction = array('controller' =
'users', 'action' = 'login');
$this-Auth-loginRedirect = array('controller' = 'discs', 
'action'
= 'hello');
$this-Auth-logoutRedirect = '/';
$this-Auth-loginError = 'Invalid name / password
combination.  Please try again';
}

 - I got a classic login.ctp
 - and in my discs_controller :

function beforeFilter() {
$this-Auth-allow(*);
parent::beforeFilter();
}


The issue is, when i log through the login page, i am correctly
redirected, but on the redirect page the Auth variable aren't set.
Here is the content of $session-read() on hello.ctp, after login.
($session-read('Auth.User') is empty);

Array ( [Config] = Array ( [userAgent] = [time] = 1301618408
[timeout] = 10 ) )


I see there is some trouble with some fix on the net so i :
 - Configure::write('Session.checkAgent', false);
 - Configure::write('Security.level', 'low');
in core.php but without any success.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Configure datasources plugin

2011-03-03 Thread damien d
Hi,

I'm new on cakephp 1.3.7 and i want to access a sqlite3 db.
So i take a look to datasources plugins (https://github.com/cakephp/
datasources/) that support this kind of database.

I unzip it under app/plugins/datasources, and i configure my database
under database.php :
class DATABASE_CONFIG {

var $default = array(
'driver' = 'Datasources.DboSqlite3',
'host' = '',
'port' = '',
'login' = '',
'password' = '',
'database' = '/var/www/discofy/discotify.db/',
'schema' = '',
'prefix' = '',
'encoding' = ''
);
}


But when i go to cakephp start page , i have :

Your database configuration file is present.
Cake is NOT able to connect to the database.


Any idea to help me ? the readme file isn't enought explicit to help
me as i'm a newbie.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php