We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

micro rest api error

<?php

$app = new Phalcon\Mvc\Micro();
$app->get('/say/welcome/{name}', function ($name) {
    echo "Welcome $name!";
});
$app->handle();

i request https://localhost/say/welcome/douma has error

Fatal error: Uncaught exception 'Phalcon\Mvc\Micro\Exception' with message 'Not-Found handler is not callable or is not defined' in

pls help me to fix it



85.5k

sorry but jsut to be sure, you request it with GET not with POST right ?



1.5k

i request is GET



1.5k

doumaMBP:build douma$ curl https://localhost/say/hello/douma <br /> <b>Fatal error</b>: Uncaught exception 'Phalcon\Mvc\Micro\Exception' with message 'Not-Found handler is not callable or is not defined' in /Users/douma/Sites/index.php:8 Stack trace:

0 /Users/douma/Sites/index.php(8): Phalcon\Mvc\Micro->handle()

1 {main}

thrown in <b>/Users/douma/Sites/index.php</b> on line <b>8</b><br />



1.5k

i fix it becase .htaccess is error.



1.5k

i fix it becase .htaccess is error.