dmraid error reporting by email

dmraid is a software raid/fakeraid/onboard raid tool. As far as I can tell, the only error reporting that dmraid does is by hooking into logwatch – which emails me a very long file I don’t often read and I would like to know immediately if my raid array is degraded. This works for me on […]

PHP Recursive File Copy Function

I couldn’t find a function online that copies folders recursively in PHP and actually works, so I wrote my own: function recursiveCopy($src, $dest) { if (is_dir($src)) $dir = opendir($src); while ($file = readdir($dir)) { if ($file != ‘.’ && $file != ‘..’) { if (!is_dir($src.’/’.$file)) copy($src.’/’.$file, $dest.’/’.$file); else { @mkdir($dest.’/’.$file, 0750); recursiveCopy($src.’/’.$file, $dest.’/’.$file); } //else […]

Roundcube: Vacation message with Virtualmin Plugin

None of the vacation/forwarding plugins work with Virtualmin so this is my workaround. Firstly, users need to be created as Mail and FTP users, since we will be using FTP to place the .forward files. Download and unzip the plugin: wget http://downloads.sourceforge.net/project/rcubevacation/vacation-1.9.9.zip?use_mirror=ovh&ts=1280145947 unzip vacation-1.9.9.zip cd vacation vi config.ini We are going to use Usermin’s own […]

Roundcube: Change Virtualmin Password Plugin

I can never get the Virtualmin binary file compilation to work properly, so here’s my workaround to enable changing a user’s Virtualmin password in Roundcube Webmail. Firstly, let’s go to the plugins/password directory (your path will be different): cd ~username/public_html/webmail/plugins/password cp config.inc.php.dist config.inc.php vi config.inc.php We need to change the password driver to virtualmin (hit […]

CentOs: Install ffmpeg & ffmpeg-php 0.6

The ffmpeg installed by yum cannot be used with ffmpeg-php, so we need to download and compile it: cd ~admin/software wget http://www.ffmpeg.org/releases/ffmpeg-0.6.tar.gz tar zxfv ffmpeg-0.6.tar.gz cd ffmpeg-0.6 ./configure –enable-shared make make install Now we need to download and configure ffmpeg-php: cd ~admin/software wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=puzzle&ts=1278667907 tar -xjf ffmpeg-php-0.6.0.tbz2 cd ffmpeg-php-0.6.0 phpize ./configure There’s an error in […]

CentOS: Install PHP 5.2 with t1lib support

The first step is to vanilla install PHP 5.2 (to handle any dependency issues) and then recompile it with the t1lib option. So enable the testing repo of CentOS 5. Change to root user first, then create the repo: su – vi /etc/yum.repos.d/CentOS-Testing.repo Enter insert mode (hit i) and paste the following into the new […]