MediaWiki OpenID Extension
After working to install version 0.7.0 of the MediaWiki OpenID extension, it turns out that the whole thing boils down to 7 pretty darn simple steps. Although the OpenID extension README says the extension was “tested with 2.0.0 rc2” (of the php-openid library), the plugin doesn’t actually work with php-openid-2.0.0. For some reason, I feel chicken about clarifying this point on the actual extension wiki site – perhaps if somebody externally validates my findings and comments here, I’d feel better about it…
- Download/check out the extension and place it in the extensions directory as extensions/OpenID.
- Create the user_openid table from the .sql file included in the OpenID directory:
mysql <dbname> -u <username> -h <hostname> -p < openid_table.sql
- Create an includes directory within the extensions subdirectory (this is where I put it – if you want it somewhere else, just make sure that it is a place that won’t be overwritten or deleted during upgrades, and alter the path in step 6 accordingly).
- Download version 1.2.3 of the PHP-OpenID library and place it in extensions/includes.
- Run the detect.php script inside of extensions/includes/php-openid-1.2.3/examples and do your best to deal with what it says. If you are missing things like MySQL and PEAR, you’ll just have to figure that out yourself, sorry. If, however, the results of the detect.php script tell you that you have no big integer math support as shown below, you should uncomment the define command in the code you paste into LocalSettings.php in step 6:
- Add the following lines to LocalSettings.php (remember to uncomment the NO_MATH_SUPPORT line if you received the error shown in step 5):
- Attempt to log into your site with an OpenID – hopefully it works!
Your PHP installation does not include big integer math support. This
support is required if you wish to run a secure OpenID server without using
# -- OpenID Extension
$path = "$IP/extensions/includes/php-openid-1.2.3";
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
# -- uncomment the following line if you have no big integer math support!