Hello,
I try to make a redirection towards an address in my controller:

Code of the controller:
-------------------------------
function add() {
    $modelClass = $this->modelClass;

    if (!empty($this->data)) {
        $this->$modelClass->create();
        $this->data['Plan']['description'] = $this->html2text($this-
>data['Plan']['description']);
            $this->$modelClass->save($this->data["Plan"]);

            $this->redirect('/'.$this->viewPath.'/index');
    }

}

1)      The execution of this code on my PC with EasyPhp 2.0 works
correctly

2)      The execution of this code on Unix server with "PHP version 5.2.5,
System HP-UX frl4 B.11.11 U 9000/800 " generate the following error:

Warning (2): Cannot modify header information - headers already sent
by (output started at /opt/hpws/apache/htdocs/cake/app/
app_controller.php:75) [CORE/cake/libs/controller/controller.php, line
546]

header - [internal], line ??
Controller::redirect() - CORE/cake/libs/controller/controller.php,
line 546
PlansController::add() - APP/controllers/plans_controller.php, line
165
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 268
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 240
[main] - APP/webroot/index.php, line 84

I do not really manage to understand why I have this error; somebody
can help me on this subject?

Thank you
Frédéric

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to