Archive for the ‘Work’ Category

Aurora (webdev server) gets a breath of new life

Friday, March 19th, 2010

Another day, another server that needs special attention. I keep moving operating systems from old hardware to new, from bare metal to virtual and vice-versa every now and then, but today was different.

What makes Aurora so special is – its the first server I setup at my current workplace while I was four months into the job, hired as a Web Programmer. Running on a Intel Celeron, 20GB hdd and 256MB RAM it served us very well until a few months ago, when it started to randomly freeze and could not handle the load the dev guys threw at it. Complaints followed. In the past two day it had to be restarted twice! Unscheduled restarts are irritating because it only means one thing – bad reliability.

Aurora was long over due for a hardware upgrade so I took this as an opportunity to process it. At around five in the evening when it hung, instead of going to restart it, I went over to the admins who were kind enough to give me a commodity DELL desktop( yes we run most of our in-house servers on commodity DELL boxes, some have their CPU’s upgraded to support hardware virtualization ). This was supposed to a quick cp -parv old_hdd new_hdd and grub-install but turned out to be a seven hours exercise. The damn thing took five and a half hours to copy 15GB from the old IDE drive to the new SATA. On booting it on the new hardware, the kernel kept restarting while at boot. Turns out I had to pass “ro” as a parameter so that the root file system could be checked before being used as root file system. Quite straight forward but the kernel rebooting without telling me this did not help. “noreboot and pause” as parameters to the kernel did not help either. “maxcpus=1″ got it to boot successfully and do a disk check without going into a reboot cycle. I don’t know how and why, but it did. I used it because I had a feeling that the kernel could not support the new Core2 Duo’s dual cores. That was not the end of the evening, the new hardware’s network chipset needed the e1000e driver which was not included in the kernel. Went over to the stores and got a old network card, which worked out of the box. Migration complete!

Aurora was perhaps when I went from being a “Web Programmer” to a “Web Administrator”. I would like to thank my ex-managers Seshadri and Krishnan for recognising my potential and nurturing it. Cheers you guys !

~Francis

phplist 2.10.10 : fixing FCK editor’s image upload problem

Wednesday, September 16th, 2009

I spent the last hour fixing this trivial bug. Posting it so that it helps save someone’s time

Open file :

PHPListRoot/admin/FCKeditor/editor/filemanager/connectors/phplist/config.php 

on line number 28 change:

} elseif (is_file('../../../../../../../../config/config.php')) {  

to:

} elseif (is_file('../../../../../../config/config.php')) { 

and on line number 29, change:

  include "../../../../../../../../config/config.php"; 

to

  include "../../../../../../config/config.php"; 

Thats it! Save the file and you should be able to instantly upload images using the FCK editor

Set display name of outgoing Emails send by phpBB311

Thursday, November 13th, 2008

phpBB3 [version 3.0.3] by default cannot set the display name in the headers of outgoing emails. You could try all you want from the administration control panel but a look under the hood in the source code will tell you its almost impossible.

Fixing it is pretty easy.

open file phpBB3_root_path/includes/functions_messenger.php
find:
$headers[] = 'From: ' . $this->;from;
replace with:
$headers[] = 'From: Display Name ' . $this->;from;
find:
$headers[] = 'Reply-To: ' . $this->;replyto;
replace with:
headers[] = 'Reply-To: Display Name ' . $this->;replyto;
find:
$headers[] = 'Return-Path: <' . $config['board_email'] . '>;';
replace with:
$headers[] = 'Return-Path: Display Name <' . $config['board_email'] . '>;';
find:
$headers[] = 'Sender: <' . $config['board_email'] . '>;';
replace with:
$headers[] = 'Sender: Display Name <' . $config['board_email'] . '>;';

That should do the trick. Did it work for you ?