We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

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.

Redirects at webfaction not working

Hey there,

my problem is as follows: I develop my application a Vagrant VM using PHP 5.5, Apache 2 and Phalcon 1.3.0. I host my staging stuff in webfaction account, which is one of the few hosters to support Phalcon/which allows you to compile it yourself. Both environments use PHP 5.5 and Phalcon 1.3.0.

To login/logout in my backend, I use the following no-brainer-code. Locally, this works flawless. I also remember it worked at fortrabbit (can't verify atm). At webfaction, however, the redirects all result in a white page with error 500 in the console. The webfaction error logs don't contain anything, though. I am completely lost. Does anyone have an idea what could be the issue? :(

Edit: I noticed that what works is dispatcher->forward, but not response->redirect. But I don't want to internally forward all the time, if it can be avoided.

 * Login for the users
 * @return \Phalcon\Http\Response
public function loginAction()
    $form = new Login();

    if ($this->request->isPost()) {
        if ($form->isValid($this->request->getPost())) {
            try {
                        'username' => $this->request->getPost('username'),
                        'password' => $this->request->getPost('password')
                // Disable view to prevent invisible output of session flashes
                $this->flashSession->success('Welcome back!');
                $this->response->redirect(['admin', 'index']);
            } catch (Exception $e) {
        } else {
            foreach ($form->getMessages() as $message) {

    $this->view->form = $form;

 * @return \Phalcon\Http\Response
public function logoutAction()

edited Mar '14

shouldn't it be:


instead of:

$this->response->redirect(['admin', 'index']);

Stupid me. Thanks!