Hi everyone,
I am the webmaster of Moegirlpedia. We currently got about 60,000
visitors/day and noticed that single VPS can't support the website. This is
a wiki about Japanese Anime. So images, videos and dynamic functions are
heavily used.
Currently the topology of servers looks like:
A Linode 2GB for mysql with memcached.
A linode 4GB for Mediawiki with APC and image storage.
Multiple VPS or host by donates for Varnish cache.
We would like to add multiple web servers for Mediawiki and storage image
on a single major server. However, we don't know how to set Mediawiki so
that it will upload and storage images to another server.
Any help about speeding up and images storage are appreciated!
--
Bask Ice | 晒太阳的冰
Moegirlpedia founder
E-mail ice(a)moegirl.org
2290 3rd Avenue Basement, New York, United States
Hi,
I want to log a user into our wiki if they are logged into our website.
I assume that I need to use the UserLoadFromSession hook, but at this
point in the code, the MW session is already active. Does it make sense
to close the MW session, configure & start my website session in order
to access the user ID, and then re-open the MW session using
wfSetupSession(), or is this not recommended?
I see that some people access their website username from another
cookie, but I'd like to avoid this if possible.
This is the rough idea that seems to be working, I think:
$wgHooks['UserLoadFromSession'][] = function($user, &$result) {
// Check if the user is already logged into MW.
// How do I do this???
// Close MW session.
session_write_close();
// Configure website session.
session_name('x');
session_save_path('x');
ini_set('session.cookie_domain', '.x');
session_start();
// Check if user is logged in to website.
if (isset($_SESSION['Zend_Auth'])) {
$userId = (int)$_SESSION['Zend_Auth']['storage'];
// Close website session.
session_write_close();
// temp, look up username in DB.
if ($userId == 123) {
$username = 'xyz';
}
$user = User::newFromName($username);
// Log user in.
$user->setToken();
$user->saveSettings();
wfSetupSession();
$user->setCookies();
} else {
wfSetupSession();
}
return true;
};
I'm not sure if this is the best option, and also how to bypass this
code if the user is already logged into the wiki.
I also need to auto-create an account for users without MW accounts, but
I think I can use $user->addToDatabase() for that.
Any help would be greatly appreciated.
Glen.
So does anyone know why the Extension Matrix is not being updated? Mediawiki is generally behind the game already compared to other open source software packages (Joomla, Wordpress,etc) and now there's no page that shows new, improved and better extensions! Just makes no sense to me, but I'm hoping I missed a secret message that redirects everyone to a new spot to find all the brand new extensions.
Sent from my iPad