@phil67000 yes I use config.php and the paths seems to be the good ones.
So, I added var_dump($loader); to the loader.php file, like this:
<?php
$loader = new Phalcon\Loader();
// We're a registering a set of directories taken from the configuration file
$loader->registerDirs(
[
APP_PATH . $config->application->controllersDir,
APP_PATH . $config->application->pluginsDir,
APP_PATH . $config->application->libraryDir,
APP_PATH . $config->application->modelsDir,
APP_PATH . $config->application->formsDir
]
);
var_dump($loader);
$loader->register();
And here is what I get when I load index:
C:\xampp\htdocs\invocare\app\config\loader.php:18:
object(Phalcon\Loader)[36]
protected '_eventsManager' => null
protected '_foundPath' => null
protected '_checkedPath' => null
protected '_classes' =>
array (size=0)
empty
protected '_extensions' =>
array (size=1)
0 => string 'php' (length=3)
protected '_namespaces' =>
array (size=0)
empty
protected '_directories' =>
array (size=5)
0 => string 'C:\xampp\htdocs\invocare/appC:\xampp\htdocs\invocare/app/controllers/' (length=69)
1 => string 'C:\xampp\htdocs\invocare/appC:\xampp\htdocs\invocare/app/plugins/' (length=65)
2 => string 'C:\xampp\htdocs\invocare/appC:\xampp\htdocs\invocare/app/library/' (length=65)
3 => string 'C:\xampp\htdocs\invocare/appC:\xampp\htdocs\invocare/app/models/' (length=64)
4 => string 'C:\xampp\htdocs\invocare/appC:\xampp\htdocs\invocare/forms/' (length=59)
protected '_files' =>
array (size=0)
empty
protected '_registered' => boolean false
AppController handler class cannot be loaded
0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('AppController h...', 2)
1 [internal function]: Phalcon\Dispatcher->_dispatch()
2 [internal function]: Phalcon\Dispatcher->dispatch()
3 C:\xampp\htdocs\invocare\public\index.php(56): Phalcon\Mvc\Application->handle()
4 {main}
So, I see there is a problem with paths indeed. So, I removed the "APP_PATH " part, and I get this:
C:\xampp\htdocs\invocare\app\config\loader.php:18:
object(Phalcon\Loader)[36]
protected '_eventsManager' => null
protected '_foundPath' => null
protected '_checkedPath' => null
protected '_classes' =>
array (size=0)
empty
protected '_extensions' =>
array (size=1)
0 => string 'php' (length=3)
protected '_namespaces' =>
array (size=0)
empty
protected '_directories' =>
array (size=5)
0 => string 'C:\xampp\htdocs\invocare/app/controllers/' (length=41)
1 => string 'C:\xampp\htdocs\invocare/app/plugins/' (length=37)
2 => string 'C:\xampp\htdocs\invocare/app/library/' (length=37)
3 => string 'C:\xampp\htdocs\invocare/app/models/' (length=36)
4 => string 'C:\xampp\htdocs\invocare/forms/' (length=31)
protected '_files' =>
array (size=0)
empty
protected '_registered' => boolean false
AppController handler class cannot be loaded
0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('AppController h...', 2)
1 [internal function]: Phalcon\Dispatcher->_dispatch()
2 [internal function]: Phalcon\Dispatcher->dispatch()
3 C:\xampp\htdocs\invocare\public\index.php(56): Phalcon\Mvc\Application->handle()
4 {main}
But still the same error in the end.
EDIT: I don't get why, the text goes so big at the end, sorry...