Hi,

I still have problems to get the database connection to work. I just
tried it on a totaly new agavi project. I updated as well the
agavi-sources from svn. 

I've got an postgres database with a table called session that has 4
fields: id name data timestamp

I tried to insert values via psql-shell and it worked fine. So its no
problem with the database.

Here my setting of the contexts.ini:
[contexts]
    default = "web"
    
[web]
    action_stack               = "ActionStack"
    controller                 = "FrontWebController"
    execution_filter           = "ExecutionFilter"
    database_manager           = "DatabaseManager"
    request                    = "WebRequest"
    security_filter            = "BasicSecurityFilter"
    storage                    = "SessionStorage"
    user                       = "BasicSecurityUser"
    storage                    = "PostgreSQLSessionStorage"
    storage.param.session_name = "test_session"
    storage.param.db_table     = "session";
    storage.param.db_id_col    = "id";
    storage.param.db_time_col  = "timestamp";
    storage.param.db_data_col  = "data";

databases.ini:
[databases]

    default = "Default"

[Default]

    class = "PostgreSQLDatabase"

    param.user     = "test"
    param.password = "test"
    param.database = "mydatabase"
    param.host     = "localhost"
    param.port     = "5432"

When I know try to run the app, i get following error: 
Fatal error: Call to a member function getDatabase() on a non-object
in
/usr/local/lib/webdev/agavi/src/storage/PostgreSQLSessionStorage.class.php
on line 238)

I looked at the sourcecode and it seems like, that
$this->getContext()->getDatabaseManager() is not available. 

Where do I configure the Databasemanager. I've got in the contexts.ini
the datavase_manager key, but i don't know which other values i can
set there?

Some advive?
-- 
J. Erik Heinz
Keyboard-samuraing in process
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to