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.

Wrong behaviour in php7

So, we had a working aplication on php5.6 and we updated to 7.0. Most of the app is still working properly but there is this one thing we cannot sort out.

When I navigate to '/ajax/sendContact' it returns a 404 error and shows the 404 error page but I've got a controller named AjaxController whit a sendContact. So i went to the dispacher and deactivated the not found handler. Now, instead of the 404 page it dumps the code in the controller and throws an exception. Anybody knows whats happening?

            $contenido = ob_get_contents();
            $new_contacto->soap_exception = $contenido;

            if ($new_contacto->save() === false) {

        if ($new_contacto->save() === false) {

        echo $new_contacto->http_response_code;


AjaxController handler class cannot be loaded

#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('AjaxController ...', 2)
#1 [internal function]: Phalcon\Dispatcher->_dispatch()
#2 [internal function]: Phalcon\Dispatcher->dispatch()
#3 /var/www/html/webpromos_adri/public/index.php(28): Phalcon\Mvc\Application->handle()
#4 {main}

AjaxController handler class cannot be loaded is fairly self-explanatory; your autoloader cannot find the file to load the class.

What is your AL strategy? Phalcon/composer/custom?


Sorry pals, short tags was not active and was used in that controller. I guess thats why I got the controller code dumped as response

No one should be using short tags at first place.