On Mon, Nov 30, 2009 at 2:52 PM, Martin Higham <[email protected]> wrote: > I did find that if I added table() and key() functions to User_username that > this fixed the problem.
Could you please explain this a bit more? Thanks. Chris. > I don't know enough about how DB_DataObject works to know where it expects > to find the table definition normally. Is there a script that needs to be > run for the plugin database table definition to be created? > Martin > > 2009/11/30 Chris Fanning <[email protected]> >> >> On Sat, Nov 28, 2009 at 5:00 PM, Martin Higham <[email protected]> >> wrote: >> > Forgot to send this reply to the list >> > >> >> Well the table is there, I can see it if I access the db through >> >> phpadmin >> >> but I still get the same error >> >> >> >> >> >> 2009/11/27 Christopher Vollick <[email protected]> >> >>> >> >>> On 27-Nov-09, at 11:24 AM, Martin Higham wrote: >> >>>> >> >>>> User_username::register(object,string,string) is being called from >> >>>> the >> >>>> AuthenticationPlugin supplied as part of StatusNet 0.9. >> >>>> >> >>>> I would have expected the StatusNet code base to define any database >> >>>> tables it needed, but it may be that I've missed a key part out from >> >>>> the >> >>>> Plugin setup. >> >>> >> >>> So it is. >> >>> The onCheckSchema event of the Authentication plugin should construct >> >>> that table. >> >>> For whatever reason, it would seem it didn't for you. >> >>> >> >>> Try running scripts/checkschema.php to do it manually. >> >> >> > >> >> Hi, I'm running into the same issue with the LdapAuthenticationPlugin >> After a fresh database install the table user_username is not present >> however it is created with structure (but empty) after I try to login >> with a user/pass on the ldap server. >> >> mysql> describe user_username; >> +---------------+--------------+------+-----+---------+-------+ >> | Field | Type | Null | Key | Default | Extra | >> +---------------+--------------+------+-----+---------+-------+ >> | provider_name | varchar(255) | NO | PRI | NULL | | >> | username | varchar(255) | NO | PRI | NULL | | >> | user_id | int(11) | NO | | NULL | | >> | created | datetime | NO | | NULL | | >> | modified | timestamp | YES | | NULL | | >> +---------------+--------------+------+-----+---------+-------+ >> >> The user attributes are taken from the ldap server and are copied into >> the 'user' table. >> >> addPlugin('ldapAuthentication', array( >> 'provider_name'=>'Example', >> 'authoritative'=>true, >> 'autoregistration'=>true, >> .... >> >> log says: >> 2009-11-30 12:34:46 LOG_ERR: PEAR error: DB_DataObject Error: >> insert:No table definition for user_username : >> 2009-11-30 12:34:46 LOG_ERR: #0 >> PEAR_Error->PEAR_Error(string,integer,integer,string) called at >> [/usr/share/php/DB/DataObject/Error.php:44] >> 2009-11-30 12:34:46 LOG_ERR: #1 >> >> DB_DataObject_Error->DB_DataObject_Error(string,integer,integer,string,NULL) >> called at [/usr/share/php/PEAR.php:576] >> 2009-11-30 12:34:46 LOG_ERR: #2 >> PEAR->raiseError(string,integer,NULL,NULL,NULL,string) called at >> [/usr/share/php/DB/DataObject.php:4144] >> 2009-11-30 12:34:46 LOG_ERR: #3 >> DB_DataObject->raiseError(string,integer) called at >> [/usr/share/php/DB/DataObject.php:904] >> 2009-11-30 12:34:46 LOG_ERR: #4 DB_DataObject->insert() called at >> [/var/www/statusnet-mainline-9.0.x/classes/Memcached_DataObject.php:69] >> 2009-11-30 12:34:46 LOG_ERR: #5 Memcached_DataObject->insert() called >> at >> [/var/www/statusnet-mainline-9.0.x/plugins/Authentication/User_username.php:40] >> 2009-11-30 12:34:46 LOG_ERR: #6 >> User_username::register(object,string,string) called at >> >> [/var/www/statusnet-mainline-9.0.x/plugins/Authentication/AuthenticationPlugin.php:136] >> 2009-11-30 12:34:46 LOG_ERR: #7 >> AuthenticationPlugin->onStartCheckPassword(string,string,object) >> called at [] >> 2009-11-30 12:34:46 LOG_ERR: #8 call_user_func_array(array,array) >> called at [/var/www/statusnet-mainline-9.0.x/lib/event.php:105] >> 2009-11-30 12:34:46 LOG_ERR: #9 Event::handle(string,array) called at >> [/var/www/statusnet-mainline-9.0.x/lib/util.php:123] >> 2009-11-30 12:34:46 LOG_ERR: #10 common_check_user(string,string) >> called at [/var/www/statusnet-mainline-9.0.x/actions/login.php:139] >> 2009-11-30 12:34:46 LOG_ERR: #11 LoginAction->checkLogin() called at >> [/var/www/statusnet-mainline-9.0.x/actions/login.php:81] >> 2009-11-30 12:34:46 LOG_ERR: #12 LoginAction->handle(array) called at >> [/var/www/statusnet-mainline-9.0.x/index.php:297] >> 2009-11-30 12:34:46 LOG_ERR: #13 main() called at >> [/var/www/statusnet-mainline-9.0.x/index.php:312] >> >> >> Where should I start looking? >> >> Thanks. >> Chris. >> >> > >> > _______________________________________________ >> > StatusNet-dev mailing list >> > [email protected] >> > http://lists.status.net/mailman/listinfo/statusnet-dev >> > > > _______________________________________________ StatusNet-dev mailing list [email protected] http://lists.status.net/mailman/listinfo/statusnet-dev
