Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

IndexController handler class cannot be loaded - Tutorial

Hi all,

Excited to get Phalcon running, but seeing some challenges.

Environment: OSX Mav, Apache 2.2, php 5.4

Dir Structure:


Code (index.php)

use Phalcon\Loader;
use Phalcon\Mvc\View;
use Phalcon\Mvc\Url as UrlProvider;
use Phalcon\Mvc\Application;
use Phalcon\DI\FactoryDefault;

try {

    // Register an autoloader
    $loader = new Loader();

    // Create DI
    $di = new FactoryDefault();

    // Setup the view component
    $di->set('view', function(){
        $view = new View();
        return $view;

    // Setup base URI/all base URLs include the sub dir phalcon_test
    $di->set('url', function(){
        $url = new UrlProvider();
        return $url;

    // Handle the request
    $application = new Application($di);

    echo $application->handle()->getContent();

} catch(\Exception $e) {
    echo "PhalconException: ", $e->getMessage();


Check this repository on Github, it has the tutorial code you need to make the example work:

Wow, that told me something I missed. IndexController.php for the file name, not index,php ;) Andres, thank you!!!!