May 10 2012

Getting rid of “error:: no video mode activated” when using full disk encryption in Ubuntu 12.04

Category: Articles,Linux administrationFractalizeR @ 9:59 pm
sudo cp usr/share/grub/*.pf2 /boot/grub
sudo update-grub

May 09 2012

One-liner to make gEdit 3 correctly autodetect russian encoding

Category: Articles,Linux administrationFractalizeR @ 10:54 pm

Recently I installed Ubuntu 12.04 and it’s gEdit doesn’t recognize cyrillic (Windows-1251) encoding correctly. I discovered one-liner to make it do the task:

sudo gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8', 'CURRENT', 'WINDOWS-1251', 'ISO-8859-15', 'UTF-16']"

Mar 20 2012

84 PHP functions for disable_functions directive

Category: PHPFractalizeR @ 12:57 pm

A list of php function functions, disabled on the servers I configured:
Continue reading “84 PHP functions for disable_functions directive”

Nov 08 2011

Autoloading PEAR incompatible classes, installed from PEAR packages

Category: Articles,PHPFractalizeR @ 12:42 pm

I like PEAR distribution system. It’s simple to use and installed packages are globally available to all your server scripts (of course, this is an advantage only when you mean it to be). But to easily use packages, installed into PEAR, they should follow some conventions, which are rather old these days, when PSR-0 is out there.

I installed Monolog library using PEAR into my system and found, that it hasn’t bundled autoloader. So, I cannot just require() one file in Monolog and start using it, after it has been installed into PEAR. I need to configure my autloader. And to configure my autoloader, I need to know the exact path of PEAR installation.

The best way I found so far to do that is stream_resolve_include_path() function. So, I’ve done that like this:

Continue reading “Autoloading PEAR incompatible classes, installed from PEAR packages”

Oct 30 2011

Symfony2: how to redirect user to a previous page correctly (without using HTTP_REFERER)

Category: Articles,Symfony2FractalizeR @ 6:09 pm

I was implementing simple menu, that would allow user to change site language.  The site uses standard symfony2 localized urls like The problem was to return user to a page, where he previously was, but rendered in a selected language. I didn’t like to do any find/replace on REFERER.

Let me show you my solution. Continue reading “Symfony2: how to redirect user to a previous page correctly (without using HTTP_REFERER)”

May 02 2011

phpSweetPDO on GitHub

Category: PHP,Software releasesFractalizeR @ 1:50 am

Some time ago I blogged about creating nice PDO wrapper. Recently I’ve created a repository for my small PDO wrapper on GitHub:

Library is released under Apache License. Feel free to use it!

Tags: ,

Apr 23 2011

Smarty extention for Silex framework

Category: Silex framework,Software releasesFractalizeR @ 10:56 pm

I’ve just released a first version of Smarty extension for Silex framework. You can take it here

Silex is a PHP microframework for PHP 5.3. It is built on the shoulders of Symfony2 and Pimple and also inspired by sinatra.

A microframework provides the guts for building simple single-file apps.

Jan 25 2011

vBTruth: the truth about VBulletin and Internet Brands

Category: VBulletinFractalizeR @ 12:37 pm

Today I stumbled upon a good site –

If you want to know anything about Internet Brands suit against XenForo, you should definitely visit it and read some pages about so-called “idea stealing proofs” of IB.

I enjoyed reading it really.

Nov 17 2010

Joomla’s Slick RSS (mod_slick_rss) improved and reworked for Joomla 1.5 and PHP 5.3

Category: Joomla addonsFractalizeR @ 2:02 pm


Recently I was upgrading my websites on Joomla and moved them to PHP 5.3. I noticed too many errors from mod_slick_rss extension coming to PHP log. I’ve fixed them and added some new options:

  • Some new CSS classes to further style layoout
  • Ability to sort feeds by date or by their original order in the feed
  • Header and footer texts to display before and after the feed
  • Ability to output item date in the feed in a given format

You can download updated version here.

Nov 11 2010

Splitting string at capitalized letters

Category: Articles,Code snippets,PHP,PHPFractalizeR @ 7:42 pm

Recently I had a task to split a given string at capitalized characters, having those saved in PHP. I’ve invented the following solution:

$str = 'TestMyFuncCall';
var_dump(preg_split('/(?=[A-Z])/', $str, null, PREG_SPLIT_NO_EMPTY));

The result is:

array(4) {
  string(4) "Test"
  string(2) "My"
  string(4) "Func"
  string(4) "Call"

I utilize regular expressions assertions here to avoid character loss.

Nov 08 2010

Practising OOP in PHP5: emulating mixins (Ruby-like)

Category: Articles,PHPFractalizeR @ 12:25 am

Some evening I was implementing behavorial patterns in my framework’s ORM and I desperately needed something like Ruby mixin or C# extension method or like trait/graft in PHP6+. So I was curious to see how can I implement mixins in PHP. If you don’t know what mixin is, I will tell you at once.

So, I invite you to follow me on paths to implementing mixins in PHP and programming a small library to support them. This article targets beginner and average level programmers. Just be sure you know what OOP is. During the process, I will also make some small mistake about nuances of PHP 5.3 work with classes, will point to it and suggest my solution to it. Good reading!

Continue reading “Practising OOP in PHP5: emulating mixins (Ruby-like)”

Tags: , ,

Nov 05 2010

Munin: Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

Category: Articles,Linux administrationFractalizeR @ 5:15 pm

To fix this bug, you need to patch a file /usr/share/munin/munin-graph in the following way:

Continue reading “Munin: Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()”

Nov 05 2010

Munin troubles: Fatal error: Could not open “/var/lib/munin/datafile” for writing

Category: Articles,Linux administrationFractalizeR @ 4:09 pm


Having installed Munin recently on my servers, I started to get emails from cron saying

Fatal error: Could not open "/var/lib/munin/datafile" for writing: Permission denied at /usr/lib/perl5/vendor_perl/5.8.8/ line 727.
(process:18039): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

I also got some errors about /var/log/munin/munin-update.log being inaccessible. Somehow these files does not belong to munin:munin, but to rrdcache:rrdcache, so the solution is just to make them chmod 0777 and that should solve the problem.

Oct 07 2010

XenForo 1.0 Beta 1 Admin Control Panel in Pictures

Category: Articles,XenForoFractalizeR @ 10:50 pm

If you are going to make a decision about purchasing XenForo, I think, it will be useful for you to catch an image of XenForo admin area because it really reveals almost full XenForo potential. No text below. Just images. Have fun!

Continue reading “XenForo 1.0 Beta 1 Admin Control Panel in Pictures”

Oct 04 2010

Internet Brands claims against Xenforo

Category: Articles,VBulletinFractalizeR @ 9:40 pm

Today, at the very edge of XenForo sales starting day Internet Brands claimed against XenForo.

Continue reading “Internet Brands claims against Xenforo”

Sep 27 2010

Regular expression for russian letters in UTF-8

Category: Articles,Code snippets,PHP,PHPFractalizeR @ 1:27 pm

Sep 17 2010

VBulletin 4.0.7: they rocked me again

Category: Articles,VBulletinFractalizeR @ 12:19 pm

For some time I was deeply afraid of installing any new release of VBulletin to the forum I administer. But after 4.0.7 came out with several performance bugs fixed I though, that may be it’s time to install it and hoped that installation will go smooth. I closed the forum for 1 hour, blamed myself for writting “1 hour” in the closed message text because surely simple bugfix forum update cannot take longer than 15 mins, right? NOWAY. I was mistaken.

Continue reading “VBulletin 4.0.7: they rocked me again”


Jul 15 2010

VBulletin QA Team Epic Fail #4.0.5: AAARGGHHH!

Category: Articles,VBulletinFractalizeR @ 10:34 pm

VBulletin 4.0.5 is released. Among some bug fixes (about 50), we’ve got some new ones to laugh at.

If you install this “maintenance pack”, you will happily look at your forum usernames now contain ARG:5 UNDEFINED message. Nice, eh?

But again, as with the bugs in 4.0.4 nothing of this kind appeared on official VBulletin forum which is running 4.0.5 since yesterday. Do VBulletin developers develop bugs especially for our forums?

VBulletin QA team, congratulations on one next epic fail! ;)

P.S. As any VBulletin user you are welcome to install this great new update with 50 bugfixes. As for me… I’ll better wait….


Jul 06 2010

VBulletin 4: “This seems like a terrible place to put this, but I don’t know where else it should go.”

Category: Articles,VBulletinFractalizeR @ 12:26 pm

class_taggablecontent.php of VBulletin 4.0.4 forum engine contains the following code:

//This seems like a terrible place to put this, but I don't know where else it should go.
if ($vbulletin->options['tagmaxlen'] <= 0 OR $vbulletin->options['tagmaxlen'] >= 100)
       $vbulletin->options['tagmaxlen'] = 100;

Continue reading “VBulletin 4: “This seems like a terrible place to put this, but I don’t know where else it should go.””


Jun 24 2010

VBulletin 4.0.4 PL1 out! “We will rock you!”

Category: Articles,VBulletinFractalizeR @ 10:51 am

VBulletin 4.0.1 PL 1 is now out. I was going to install it but… It does not fix any of the Known issues. ;)  Why? Who knows…


Next Page »