Archive for category Mediawiki

Integrating mediawiki with a symfony project symfony 1.3

I needed to add a mediawiki to a secure module in my symfony project

This is how I did it.

  • I downloaded mediawiki into my web dir web/wiki
  • After installation, I edited the LocalSettings.php, I added this block to secure the wiki.
    It is the same theory as a batch file:
require_once('../../config/ProjectConfiguration.class.php');
$configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'dev', true);
sfContext::createInstance($configuration);

$databaseManager = new sfDatabaseManager($configuration);
$databaseManager->loadConfiguration();

if(!sfContext::getInstance()->getUser()->isAuthenticated()) {
    sfContext::getInstance()->getController()->redirect("http://".$_SERVER['HTTP_HOST']."/user/login");
}

4 Comments

Specifying MySQL port on MediaWiki

>>>quoted from this site
http://microrants.blogspot.com/2007/08/specifying-mysql-port-on-mediawiki.html

MySQL listens on port 3306/tcp by default. MediaWiki’s 1.7.1 configuration is a bit misleading when it comes to specifying the database port. This excerpt is from LocalSettings.php:

$wgdBserver = “localhost”;
$wgDBname = “mw0″;
$wgDBuser = “my_user”;
$wgDBpassword = “my_pass”;
$wgDBprefix = “mw_”;
$wgDBtype = “mysql”;
$wgDBport = “3308″; // <— DOES NOT work for MySQL

The value in $wgBDport is only used with PostgreSQL. To specify a MySQL connection port different than 3306, use the syntax server:port on $wgdbServer. For instance:

$wgdBserver = “localhost:3308″;

BUT! there’s another catch: when the server is defined to “localhost”, MySQL will default to connecting via socket. If you are changing the port in hopes of getting WikiMedia to connect to another running instance of MySQL, chances are that it will still connect to the “default” one. To force a TCP connection use the loopback IP address instead of “localhost”:

$wgdBserver = “127.0.0.1:3308″;

No Comments