Change __DIR__ to dirname(__FILE__) to make compatible with PHP 5.2