I have just upgraded from 0.8.3 and now OpenID is not working. When I try to add an OpenID URL I just get a blank page at
http:///mydomain/settings/openid(I have replaced my actual domain with "mydomain"). I do recall a fleeting error message that appeared when I ran the rebuilddb.sh that referenced openid, but initially everything seemed to be fine. Any suggestions?
Comments
ERROR 1146 (42S02) at line 401: Table 'statusnet.user_openid' doesn't exist
Is it possible that something didn't run properly in this rebuild script? Can I check by looking for something in the database.
the db/statusnet.sql script does not create a user_openid table so when the dump of the original database is reloaded by rebuilddb.sh there is no table to insert the previous data into. However, the user_openid table now does exist and that seems to be because the OpenID plugin creates the table if it doesn't exist. So, since I still have a copy of the sql dump of the old database, I tried cutting out the user_openid insert commands. While that successfully inserted the old data, the problem with adding OpenID persisted.
Since the mysql batch would have failed when the user_openid table wasn't found, no subsequent commands would have been run. All that appears in the sql file after the insert is the following:
/*!40000 ALTER TABLE `user_openid` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
These look like comments to me, so I'm not sure whether there's anything important here that should have been done that wasn't done.
I'm not sure what to do next in my troubleshooting. The only other thing I can think of doing is deleting all the records from oid_associations and oid_nonces.
run /statusnet/scripts/checkschema.php
-Aric
I believe you need to get the three OpenID tables (openid_users, oid_nonces, and oid_associations) into a consistent state. If you have existing users, hopefully you can restore those tables from backup.
I think the proper way to upgrade from 0.8 to the latest 0.9 is to run
db/08to09.sql
db/rc2torc3.sql
db/rc3torc4.sql
on your existing DB, rather than rebuild.sh. OpenID was moved to a plugin, and is now responsible for creation of the user_openid table.
Unfortunately, our documentation on this upgrade process isn't too good.
http://status.net/wiki/Upgrade_notes_0.9
Also, I've had a closer look at 08to09.sql and the others, and they don't seem to reference the oid tables. I'm hoping that my other data is essentially ok, and there's just an OpenID problem to solve now!
http:///mydomain/settings/openid
I mean that I never even make it as far as a page of the OpenID provider. Are there some debug settings I should try turning on? Should I drop the oid tables completely?
in extlib/Auth/OpenID/CryptUtil.php there is a reference to /dev/urandom and this does not exist on my server. For now I have changed this to null and OpenID now works.
which os is this that has no dev/urandom? Solaris?
add this for full db debugging
$config['db']['debug'] = create_function('$class, $message, $logtype, $level','common_log(LOG_DEBUG,"DBDO: $class / $message / $logtype");');
// Paul