Re: Warning (2): Cannot modify header information - headers already sent by

2012-06-30 Thread JuanChronos
Thanks man ... you saved me ... !!!

On Tuesday, October 4, 2011 6:27:46 AM UTC-3, BLABLABLA wrote:
>
> HI..
>
> The problem was the encoding. I have had the encoding UTF8, but needed the
> encoding UTF8 without BOM. 
>
> --
> View this message in context: 
> http://cakephp.1045679.n5.nabble.com/Warning-2-Cannot-modify-header-information-headers-already-sent-by-tp4860658p4867920.html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread Ryan Schmidt

On Oct 4, 2011, at 19:45, Matt Kaufman wrote:

> What is BOM?

http://en.wikipedia.org/wiki/Byte_order_mark

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread O.J. Tibi
No, what Larry meant was ob_start() is an ugly hack, and you shouldn't use 
it.

You might want to take a look at the other thread. Most probably, your 
controller file has a Byte Order Mark (BOM). Use a UTF-8 text editor that 
doesn't insert BOMs into your file, or if you can disable BOM insertions 
from your editor, do so.

It's a given fact that BOMs don't work well with PHP.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread O.J. Tibi
BOM is short for Byte Order Mark. It acts like a "magic bit" for the 
application to detect if the document is Unicode, some other variant of 
Unicode, or any other encoding. And yes, coders should turn off BOM in their 
editors by default. :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread Matt Kaufman
Lol- yeah I was taken back by this!  'good tip' is all I could come up with.

Sent from my iPhone

On Oct 4, 2011, at 5:46 PM, "Larry E. Masters"  wrote:

> You have got to be kidding me. You would not seriously suggest this to 
> someone would you?
> 
> --
> Larry E. Masters
> 
> 
> On Mon, Oct 3, 2011 at 11:34 PM, vaibhav pathak  
> wrote:
> hi friend
> try ob_start(); function before the starting of class
> CategoriesController extends AppController like in following manner.
>   ob_start();
>   class CategoriesController extends AppController
>   {
> 
> 
>   }
> 
> ?>
> from
>  vaibhav pathak
> 
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread Larry E. Masters
You have got to be kidding me. You would not seriously suggest this to
someone would you?

-- 
Larry E. Masters


On Mon, Oct 3, 2011 at 11:34 PM, vaibhav pathak  wrote:

> hi friend
> try ob_start(); function before the starting of class
> CategoriesController extends AppController like in following manner.
>   ob_start();
>   class CategoriesController extends AppController
>   {
>
>
>   }
>
> ?>
> from
>  vaibhav pathak
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread Matt Kaufman
What is BOM?

Sent from my iPhone

On Oct 4, 2011, at 2:27 AM, BLABLABLA  wrote:

> HI..
> 
> The problem was the encoding. I have had the encoding UTF8, but needed the
> encoding UTF8 without BOM. 
> 
> --
> View this message in context: 
> http://cakephp.1045679.n5.nabble.com/Warning-2-Cannot-modify-header-information-headers-already-sent-by-tp4860658p4867920.html
> Sent from the CakePHP mailing list archive at Nabble.com.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread Matt Kaufman
Nice tip

Sent from my iPhone

On Oct 3, 2011, at 9:34 PM, vaibhav pathak  wrote:

> hi friend
> try ob_start(); function before the starting of class
> CategoriesController extends AppController like in following manner.
>   ob_start();
>   class CategoriesController extends AppController
>   {
> 
> 
>   }
> 
> ?>
> from
> vaibhav pathak
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-04 Thread BLABLABLA
HI..

The problem was the encoding. I have had the encoding UTF8, but needed the
encoding UTF8 without BOM. 

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Warning-2-Cannot-modify-header-information-headers-already-sent-by-tp4860658p4867920.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-04 Thread vaibhav pathak
hi friend
try ob_start(); function before the starting of class
CategoriesController extends AppController like in following manner.

from
 vaibhav pathak

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Warning (2): Cannot modify header information - headers already sent by

2011-10-03 Thread Tilen Majerle
look at your Category model at line 1, there is output :) Check whitespaces
in this file
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/10/1 BLABLABLA 

> PLEASE HELP ME!
>
> FAILURE:
> Warning (2): Cannot modify header information - headers already sent by
> (output started at
> /var/customers/webs/usr05/mkn151/app/models/category.php:1)
> [CORE/cake/libs/controller/controller.php, line 742]
>
> CONTROLLER:
>  class CategoriesController extends AppController {
>var $name = 'Categories';
>// Zugriff ohne Login
>function beforeFilter(){
>parent::beforeFilter();
>$this->Auth->allow('choosecategories');
>}
>// Liste der Kategorien
>function index() {
>$this->Category->recursive = 0;
>$this->set('categories', $this->paginate());
>}
>// Detailansicht
>function view($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Ungültige Kategorie',
> true));
>$this->redirect(array('action' => 'index'));
>}
>$this->set('category', $this->Category->read(null, $id));
>}
>// Kategorie hinzufügen
>function add() {
>if (!empty($this->data)) {
>$this->Category->create();
>if ($this->Category->save($this->data)) {
>$this->Session->setFlash(__('Kategorie wurde
> gespeichert.', true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('Kategorie
> konnte nicht gespeichert werden.
> Versuchen Sie es nochmal.', true));
>}
>}
>$highscores = $this->Category->Highscore->find('list');
>$this->set(compact('highscores'));
>}
>// Kategorie bearbeiten
>function edit($id = null) {
>if (!$id && empty($this->data)) {
>$this->Session->setFlash(__('Ungültige Kategorie',
> true));
>$this->redirect(array('action' => 'index'));
>}
>if (!empty($this->data)) {
>if ($this->Category->save($this->data)) {
>$this->Session->setFlash(__('Kategorie wurde
> gespeichert.', true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('Kategorie
> konnte nicht gespeichert werden.
> Versuchen Sie es nochmal.', true));
>}
>}
>if (empty($this->data)) {
>$this->data = $this->Category->read(null, $id);
>}
>$highscores = $this->Category->Highscore->find('list');
>$this->set(compact('highscores'));
>}
>// Kategorie löschen
>function delete($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Ungültige Kategorie
> Id', true));
>$this->redirect(array('action'=>'index'));
>}
>if ($this->Category->delete($id)) {
>$this->Session->setFlash(__('Kategorie wurde
> gelöscht.', true));
>$this->redirect(array('action'=>'index'));
>}
>$this->Session->setFlash(__('Kategorie wurden nicht
> gelöscht.', true));
>$this->redirect(array('action' => 'index'));
>}
>// Kategorien auswählen
>function choosecategories() {
>//Session zu Beginn des neuen Spieles leeren
>$this->Session->destroy();
>//Kategorien auslesen
>if(empty($this->data)){
>$this->set('categories',
> $this->Category->find('all'));
>}else{
> 

Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-03 Thread Matt Kaufman
Argh, I remember having this problem myself on a production deployment.

Thanks for the tip on debugkit

Sent from my iPhone
Matt Kaufman
http://mkfmn.com/

On Oct 3, 2011, at 6:14 PM, Sam Sherlock  wrote:

> It could be that you have some whitepace after a php closing tag (does the 
> cats controller have any whitespace before the opening of php - very first 
> line)
> 
> the debugkit plugin has a command to search for whitespace
>  - S
> 
> 
> 
> 
> On 1 October 2011 21:30, Dragana Kuzmanovic  wrote:
> failure:
> Warning (2): Cannot modify header information - headers already sent
> by (output started at /var/customers/webs/usr05/mkn151/app/controllers/
> categories_controller.php:1) [CORE/cake/libs/controller/controller.php
> 
> my controller:
>  class CategoriesController extends AppController {
>var $name = 'Categories';
>// Zugriff ohne Login
>function beforeFilter(){
>parent::beforeFilter();
>$this->Auth->allow('choosecategories');
>}
>// Liste der Kategorien
>function index() {
>$this->Category->recursive = 0;
>$this->set('categories', $this->paginate());
>}
>// Detailansicht
>function view($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Ungültige Kategorie', 
> true));
>$this->redirect(array('action' => 'index'));
>}
>$this->set('category', $this->Category->read(null, $id));
>}
>// Kategorie hinzufügen
>function add() {
>if (!empty($this->data)) {
>$this->Category->create();
>if ($this->Category->save($this->data)) {
>$this->Session->setFlash(__('Kategorie wurde 
> gespeichert.',
> true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('Kategorie konnte 
> nicht gespeichert
> werden. Versuchen Sie es nochmal.', true));
>}
>}
>$highscores = $this->Category->Highscore->find('list');
>$this->set(compact('highscores'));
>}
>// Kategorie bearbeiten
>function edit($id = null) {
>if (!$id && empty($this->data)) {
>$this->Session->setFlash(__('Ungültige Kategorie', 
> true));
>$this->redirect(array('action' => 'index'));
>}
>if (!empty($this->data)) {
>if ($this->Category->save($this->data)) {
>$this->Session->setFlash(__('Kategorie wurde 
> gespeichert.',
> true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('Kategorie konnte 
> nicht gespeichert
> werden. Versuchen Sie es nochmal.', true));
>}
>}
>if (empty($this->data)) {
>$this->data = $this->Category->read(null, $id);
>}
>$highscores = $this->Category->Highscore->find('list');
>$this->set(compact('highscores'));
>}
>// Kategorie löschen
>function delete($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Ungültige Kategorie Id', 
> true));
>$this->redirect(array('action'=>'index'));
>}
>if ($this->Category->delete($id)) {
>$this->Session->setFlash(__('Kategorie wurde 
> gelöscht.', true));
>$this->redirect(array('action'=>'index'));
>}
>$this->Session->setFlash(__('Kategorie wurden nicht gelöscht.',
> true));
>$this->redirect(array('action' => 'index'));
>}
>// Kategorien auswählen
>function choosecategories() {
>//S

Re: PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-03 Thread Sam Sherlock
It could be that you have some whitepace after a php closing tag (does the
cats controller have any whitespace before the opening of php - very first
line)

the debugkit plugin has a command to search for whitespace
 - S




On 1 October 2011 21:30, Dragana Kuzmanovic  wrote:

> failure:
> Warning (2): Cannot modify header information - headers already sent
> by (output started at /var/customers/webs/usr05/mkn151/app/controllers/
> categories_controller.php:1) [CORE/cake/libs/controller/controller.php
>
> my controller:
>  class CategoriesController extends AppController {
>var $name = 'Categories';
>// Zugriff ohne Login
>function beforeFilter(){
>parent::beforeFilter();
>$this->Auth->allow('choosecategories');
>}
>// Liste der Kategorien
>function index() {
>$this->Category->recursive = 0;
>$this->set('categories', $this->paginate());
>}
>// Detailansicht
>function view($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Ungültige Kategorie',
> true));
>$this->redirect(array('action' => 'index'));
>}
>$this->set('category', $this->Category->read(null, $id));
>}
>// Kategorie hinzufügen
>function add() {
>if (!empty($this->data)) {
>$this->Category->create();
>if ($this->Category->save($this->data)) {
>$this->Session->setFlash(__('Kategorie wurde
> gespeichert.',
> true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('Kategorie
> konnte nicht gespeichert
> werden. Versuchen Sie es nochmal.', true));
>}
>}
>$highscores = $this->Category->Highscore->find('list');
>$this->set(compact('highscores'));
>}
>// Kategorie bearbeiten
>function edit($id = null) {
>if (!$id && empty($this->data)) {
>$this->Session->setFlash(__('Ungültige Kategorie',
> true));
>$this->redirect(array('action' => 'index'));
>}
>if (!empty($this->data)) {
>if ($this->Category->save($this->data)) {
>$this->Session->setFlash(__('Kategorie wurde
> gespeichert.',
> true));
>$this->redirect(array('action' => 'index'));
>} else {
>$this->Session->setFlash(__('Kategorie
> konnte nicht gespeichert
> werden. Versuchen Sie es nochmal.', true));
>}
>}
>if (empty($this->data)) {
>$this->data = $this->Category->read(null, $id);
>}
>$highscores = $this->Category->Highscore->find('list');
>$this->set(compact('highscores'));
>}
>// Kategorie löschen
>function delete($id = null) {
>if (!$id) {
>$this->Session->setFlash(__('Ungültige Kategorie
> Id', true));
>$this->redirect(array('action'=>'index'));
>}
>if ($this->Category->delete($id)) {
>$this->Session->setFlash(__('Kategorie wurde
> gelöscht.', true));
>$this->redirect(array('action'=>'index'));
>}
>$this->Session->setFlash(__('Kategorie wurden nicht
> gelöscht.',
> true));
>$this->redirect(array('action' => 'index'));
>}
>// Kategorien auswählen
>function choosecategories() {
>//Session zu Beginn des neuen Spieles leeren
>$this->Session->destroy();
>//Kategorien auslesen
>if(empty($this->data)){
>$this->set('categories',
> $this->

Warning (2): Cannot modify header information - headers already sent by

2011-10-03 Thread BLABLABLA
PLEASE HELP ME!

FAILURE:
Warning (2): Cannot modify header information - headers already sent by
(output started at
/var/customers/webs/usr05/mkn151/app/models/category.php:1)
[CORE/cake/libs/controller/controller.php, line 742]

CONTROLLER:
Auth->allow('choosecategories');
}
// Liste der Kategorien
function index() {
$this->Category->recursive = 0;
$this->set('categories', $this->paginate());
}
// Detailansicht
function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Ungültige Kategorie', 
true));
$this->redirect(array('action' => 'index'));
}
$this->set('category', $this->Category->read(null, $id));
}
// Kategorie hinzufügen
function add() {
if (!empty($this->data)) {
$this->Category->create();
if ($this->Category->save($this->data)) {
$this->Session->setFlash(__('Kategorie wurde 
gespeichert.', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('Kategorie konnte 
nicht gespeichert werden.
Versuchen Sie es nochmal.', true));
}
}
$highscores = $this->Category->Highscore->find('list');
$this->set(compact('highscores'));
}
// Kategorie bearbeiten
function edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Ungültige Kategorie', 
true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->Category->save($this->data)) {
$this->Session->setFlash(__('Kategorie wurde 
gespeichert.', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('Kategorie konnte 
nicht gespeichert werden.
Versuchen Sie es nochmal.', true));
}
}
if (empty($this->data)) {
$this->data = $this->Category->read(null, $id);
}
$highscores = $this->Category->Highscore->find('list');
$this->set(compact('highscores'));
}
// Kategorie löschen
function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Ungültige Kategorie Id', 
true));
$this->redirect(array('action'=>'index'));
}
if ($this->Category->delete($id)) {
$this->Session->setFlash(__('Kategorie wurde 
gelöscht.', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Kategorie wurden nicht gelöscht.', 
true));
$this->redirect(array('action' => 'index'));
}
// Kategorien auswählen
function choosecategories() {
//Session zu Beginn des neuen Spieles leeren
$this->Session->destroy();
//Kategorien auslesen
if(empty($this->data)){
$this->set('categories', $this->Category->find('all'));
}else{
$categories = array();
foreach ($this->data['Category'] as $key => $cat):
if($cat == 1){
array_push($categories, $key);
}
endforeach;
//Sessions setzen
if(count($categories) > 0){
$this->Session->write('categories', 
$categories);
    $this->Session->write('startTime', date('Y-m-d 
H:i:s'));
$this->Session->write('joker', true);
$this->Session->write('points', 0);
   

PLEASE HELP ME! Warning (2): Cannot modify header information - headers already sent by cake php

2011-10-03 Thread Dragana Kuzmanovic
failure:
Warning (2): Cannot modify header information - headers already sent
by (output started at /var/customers/webs/usr05/mkn151/app/controllers/
categories_controller.php:1) [CORE/cake/libs/controller/controller.php

my controller:
Auth->allow('choosecategories');
}
// Liste der Kategorien
function index() {
$this->Category->recursive = 0;
$this->set('categories', $this->paginate());
}
// Detailansicht
function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Ungültige Kategorie', 
true));
$this->redirect(array('action' => 'index'));
}
$this->set('category', $this->Category->read(null, $id));
}
// Kategorie hinzufügen
function add() {
if (!empty($this->data)) {
$this->Category->create();
if ($this->Category->save($this->data)) {
$this->Session->setFlash(__('Kategorie wurde 
gespeichert.',
true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('Kategorie konnte 
nicht gespeichert
werden. Versuchen Sie es nochmal.', true));
}
}
$highscores = $this->Category->Highscore->find('list');
$this->set(compact('highscores'));
}
// Kategorie bearbeiten
function edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Ungültige Kategorie', 
true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->Category->save($this->data)) {
$this->Session->setFlash(__('Kategorie wurde 
gespeichert.',
true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('Kategorie konnte 
nicht gespeichert
werden. Versuchen Sie es nochmal.', true));
}
}
if (empty($this->data)) {
$this->data = $this->Category->read(null, $id);
}
$highscores = $this->Category->Highscore->find('list');
$this->set(compact('highscores'));
}
// Kategorie löschen
function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Ungültige Kategorie Id', 
true));
$this->redirect(array('action'=>'index'));
}
if ($this->Category->delete($id)) {
$this->Session->setFlash(__('Kategorie wurde 
gelöscht.', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Kategorie wurden nicht gelöscht.',
true));
$this->redirect(array('action' => 'index'));
}
// Kategorien auswählen
function choosecategories() {
//Session zu Beginn des neuen Spieles leeren
$this->Session->destroy();
//Kategorien auslesen
if(empty($this->data)){
$this->set('categories', $this->Category->find('all'));
}else{
$categories = array();
foreach ($this->data['Category'] as $key => $cat):
if($cat == 1){
array_push($categories, $key);
}
endforeach;
//Sessions setzen
if(count($categories) > 0){
$this->Session->write('categories', 
$categories);
$this->Session->write('startTime', date('Y-m-d 
H:i:s'));
$this->Session->write('joker', true);
$this->Session->write('points', 0);

RE: Warning (2): Cannot modify header information - headers already sent by

2010-08-19 Thread oscar aguilar morales

THE PROBLEM IS THAT U A PRINTINT SOMETHING IN THE ACTION WHERE YOU A REDIRECTO 
TO OTHER  ACTION, MAYBE YOU A PRINTING AN ARRAY O AN ALERT WITH JAVASCRIPT, 
WHEN U WANT TO REDIRECT TO OTHER ACTION U CAN NOT PRINTING ANYTHING, I HAVE 
TASTED IT

From: vrh2...@gmail.com
Date: Tue, 17 Aug 2010 17:10:51 +0530
Subject: Re: Warning (2): Cannot modify header information - headers already 
sent by
To: cake-php@googlegroups.com

Comment all print and echo in your script. Kind Regards


Vikas.R.Hanagodimath



On Tue, Aug 17, 2010 at 04:47, milos  wrote:



I have just descovered something very important. My controller was working just 
fine with all redirect etc. After I changed the controller file to utf8 and 
whenever I had a redirect or session command it gave me information already 
send by my controller file.

It is because I change it to utf8. I changed it back to ansi and it was all ok.
It is very hard to see this error because part of controller does work. 
Probably when notepad++ changed my file to ut8 it added some chars which are 
not readable to us, but are to the server.

Check this when you get an error



View this message in context: Re: Warning (2): Cannot modify header information 
- headers already  sent by



Sent from the CakePHP mailing list archive at Nabble.com.





Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

 

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.

To post to this group, send email to cake-php@googlegroups.com

To unsubscribe from this group, send email to

cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en









Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

 

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.

To post to this group, send email to cake-php@googlegroups.com

To unsubscribe from this group, send email to

cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
  

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Warning (2): Cannot modify header information - headers already sent by

2010-08-17 Thread Vikas.R.Hanagodimath
Comment all print and echo in your script.

Kind Regards
Vikas.R.Hanagodimath


On Tue, Aug 17, 2010 at 04:47, milos  wrote:

> I have just descovered something very important. My controller was working
> just fine with all redirect etc. After I changed the controller file to utf8
> and whenever I had a redirect or session command it gave me information
> already send by my controller file. It is because I change it to utf8. I
> changed it back to ansi and it was all ok. It is very hard to see this error
> because part of controller does work. Probably when notepad++ changed my
> file to ut8 it added some chars which are not readable to us, but are to the
> server. Check this when you get an error
> --
> View this message in context: Re: Warning (2): Cannot modify header
> information - headers already sent 
> by<http://cakephp.1045679.n5.nabble.com/Warning-2-Cannot-modify-header-information-headers-already-sent-by-tp1318933p2637476.html>
> Sent from the CakePHP mailing list 
> archive<http://cakephp.1045679.n5.nabble.com/>at Nabble.com.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Warning (2): Cannot modify header information - headers already sent by

2010-08-17 Thread milos

I have just descovered something very important. My controller was working
just fine with all redirect etc. After I changed the controller file to utf8
and whenever I had a redirect or session command it gave me information
already send by my controller file.

It is because I change it to utf8. I changed it back to ansi and it was all
ok.
It is very hard to see this error because part of controller does work.
Probably when notepad++ changed my file to ut8 it added some chars which are
not readable to us, but are to the server.

Check this when you get an error

-- 
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Warning-2-Cannot-modify-header-information-headers-already-sent-by-tp1318933p2637476.html
Sent from the CakePHP mailing list archive at Nabble.com.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Warning (2): Cannot modify header information - headers already sent by

2009-05-18 Thread Braydenstyles

thanks will search for the white spaces..

cheers
B

On May 18, 2:04 am, paulos nikolo  wrote:
> Check for whitespaces in app_controller and the other controllers.This was
> caused from copy-paste.
> Think i may helped!
>
> Cheers
>
> 2009/5/18 Braydenstyles 
>
>
>
> > Warning (2): Cannot modify header information - headers already sent
> > by (output started at /Users/braydenstyles/Sites/app/
> > app_controller.php:112) [CORE/cake/libs/controller/controller.php,
> > line 587]
>
> > Code | Context
> > $status =       "Location:http://localhost/beta_users/login";
>
> > header - [internal], line ??
> > Controller::header() - CORE/cake/libs/controller/controller.php, line
> > 587
> > Controller::redirect() - CORE/cake/libs/controller/controller.php,
> > line 568
> > AppController::checkAuth() - APP/app_controller.php, line 269
> > AppController::beforeFilter() - APP/app_controller.php, line 141
> > UsersController::beforeFilter() - APP/controllers/
> > users_controller.php, line 49
> > Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 228
> > Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 213
> > Object::requestAction() - CORE/cake/libs/object.php, line 102
> > include - APP/views/layouts/default.ctp, line 246
> > View::_render() - CORE/cake/libs/view/view.php, line 654
> > View::renderLayout() - CORE/cake/libs/view/view.php, line 451
> > View::render() - CORE/cake/libs/view/view.php, line 384
> > Controller::render() - CORE/cake/libs/controller/controller.php, line
> > 744
> > ErrorHandler::__outputMessage() - CORE/cake/libs/error.php, line 377
> > ErrorHandler::missingController() - CORE/cake/libs/error.php, line 176
> > Object::dispatchMethod() - CORE/cake/libs/object.php, line 119
> > ErrorHandler::__construct() - CORE/cake/libs/error.php, line 120
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Warning (2): Cannot modify header information - headers already sent by

2009-05-18 Thread paulos nikolo
Check for whitespaces in app_controller and the other controllers.This was
caused from copy-paste.
Think i may helped!

Cheers

2009/5/18 Braydenstyles 

>
> Warning (2): Cannot modify header information - headers already sent
> by (output started at /Users/braydenstyles/Sites/app/
> app_controller.php:112) [CORE/cake/libs/controller/controller.php,
> line 587]
>
> Code | Context
> $status =   "Location: http://localhost/beta_users/login";
>
> header - [internal], line ??
> Controller::header() - CORE/cake/libs/controller/controller.php, line
> 587
> Controller::redirect() - CORE/cake/libs/controller/controller.php,
> line 568
> AppController::checkAuth() - APP/app_controller.php, line 269
> AppController::beforeFilter() - APP/app_controller.php, line 141
> UsersController::beforeFilter() - APP/controllers/
> users_controller.php, line 49
> Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 228
> Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 213
> Object::requestAction() - CORE/cake/libs/object.php, line 102
> include - APP/views/layouts/default.ctp, line 246
> View::_render() - CORE/cake/libs/view/view.php, line 654
> View::renderLayout() - CORE/cake/libs/view/view.php, line 451
> View::render() - CORE/cake/libs/view/view.php, line 384
> Controller::render() - CORE/cake/libs/controller/controller.php, line
> 744
> ErrorHandler::__outputMessage() - CORE/cake/libs/error.php, line 377
> ErrorHandler::missingController() - CORE/cake/libs/error.php, line 176
> Object::dispatchMethod() - CORE/cake/libs/object.php, line 119
> ErrorHandler::__construct() - CORE/cake/libs/error.php, line 120
>
> >
>

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



Warning (2): Cannot modify header information - headers already sent by

2009-05-18 Thread Braydenstyles

Warning (2): Cannot modify header information - headers already sent
by (output started at /Users/braydenstyles/Sites/app/
app_controller.php:112) [CORE/cake/libs/controller/controller.php,
line 587]

Code | Context
$status =   "Location: http://localhost/beta_users/login";

header - [internal], line ??
Controller::header() - CORE/cake/libs/controller/controller.php, line
587
Controller::redirect() - CORE/cake/libs/controller/controller.php,
line 568
AppController::checkAuth() - APP/app_controller.php, line 269
AppController::beforeFilter() - APP/app_controller.php, line 141
UsersController::beforeFilter() - APP/controllers/
users_controller.php, line 49
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 228
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 213
Object::requestAction() - CORE/cake/libs/object.php, line 102
include - APP/views/layouts/default.ctp, line 246
View::_render() - CORE/cake/libs/view/view.php, line 654
View::renderLayout() - CORE/cake/libs/view/view.php, line 451
View::render() - CORE/cake/libs/view/view.php, line 384
Controller::render() - CORE/cake/libs/controller/controller.php, line
744
ErrorHandler::__outputMessage() - CORE/cake/libs/error.php, line 377
ErrorHandler::missingController() - CORE/cake/libs/error.php, line 176
Object::dispatchMethod() - CORE/cake/libs/object.php, line 119
ErrorHandler::__construct() - CORE/cake/libs/error.php, line 120

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