After installin palcon on windows 10

So I have installed for the first time phalcon on windows 10 with xampp. Everything went great. I got even the devtools installed. But when I open the project on localhost i get this error:

PhalconController handler class cannot be loaded

0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('PhalconControll...', 2)

1 [internal function]: Phalcon\Dispatcher->dispatch()

2 C:\xampp\htdocs_Phalcon\billbox\public\index.php(42): Phalcon\Mvc\Application->handle()

3 {main}

I have created the project using phalcon command. I have double checked for any missplace in controllers or naming problems but they are ok. Any idea how to solve this one? Thanks



238
edited Dec '19

I created manyally this controller and now another error msg is showing:

Action 'demo' was not found on handler '_Phalcon'

The structure of the files is: c:\xampp\htdocs_Phalcon\demo

Added the function too. Why does the config is searching for a demoAction and not the default one;indexAction?



9.7k

Welcome to Phalcon. What verison did you installed Phalcon 3 or 4? Looks like something goes wrong with your rewriting in apache. See https://docs.phalcon.io/4.0/en/webserver-setup#apache



238
edited Dec '19

phalcon version is 3.4 still cant figuring out what is happening. after I added them manually is working but not loading the view

A bit late but who knows...

I use XAMPP too on one development machine, with a minimal Apache configuration (one VHost with DocumentRoot/ServerName + logs, one Directory to allow access, and an entry in the system hosts file to set the ServerName) and everythings runs fine.

You mentioned that the devtools were installed, but could you access their web interface through /webtools.php?

The standard URL routing form is http://hostname/controller/action , which would in this case use ControllerController.php and the actionAction method inside it.

Maybe DocumentRoot wasn't set up correctly: it should be the public subfolder, in your case c:\xampp\htdocs_Phalcon\demo\public , with a Directory directive next to it allowing access to c:\xampp\htdocs_Phalcon\ to include the eventual composer dependencies.

As for the views, you mentioned creating the controllers but not the views... if you did create them, how so?