somebody please help me...

#1
[eluser]Unknown[/eluser]
im a newbie in codeigniter...
i've got this...

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\apache2triad\htdocs\digilib\system\libraries\Exceptions.php:164)

Filename: libraries/Session.php

Line Number: 662
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\apache2triad\htdocs\digilib\system\libraries\Exceptions.php:164)

Filename: helpers/url_helper.php

Line Number: 541


what should i do???
i have no idea bout it...
Sad

#2
[eluser]skunkbad[/eluser]
The warning about the header is saying that your script is trying to send a header after content has already been sent to the browser. This could happen for instance if you loaded a view and then tried to set a cookie/session after that.

We can't really help you without seeing what your working on. Show some code.

#3
[eluser]Tominator[/eluser]
[quote author="skunkbad" date="1272111009"]The warning about the header is saying that your script is trying to send a header after content has already been sent to the browser. This could happen for instance if you loaded a view and then tried to set a cookie/session after that.

We can't really help you without seeing what your working on. Show some code.[/quote]
Really not Smile Because view() is using Output class, that's why he can use views before session or cookie.

Headers:
If you use error messages (404, 403), redirecting, setting mimetipes or using Output headers you are setting Headers. And headers are from word head, that mean first. So you have to set your headers before passing any output (echo, print_f ...)

Probably problems and solutions:
You are using echo, print, print_*, var_dump ... => You should use output class (view())

You are using wrong template parser (if you use some) => You should use native CI Template parser, or mine COMPER Template Parser

You have bad error messages system (not using Output class) => You should make error messages better way

You are using BOM => Delete BOM (BOM: http://en.wikipedia.org/wiki/Byte_order_mark)

Tom.

#4
[eluser]mi6crazyheart[/eluser]
@vickrie
Without showing codes it's difficult to track the problem.

#5
[eluser]skunkbad[/eluser]
[quote author="Tominator" date="1272147358"][quote author="skunkbad" date="1272111009"]The warning about the header is saying that your script is trying to send a header after content has already been sent to the browser. This could happen for instance if you loaded a view and then tried to set a cookie/session after that.

We can't really help you without seeing what your working on. Show some code.[/quote]
Really not Smile Because view() is using Output class, that's why he can use views before session or cookie.

Headers:
If you use error messages (404, 403), redirecting, setting mimetipes or using Output headers you are setting Headers. And headers are from word head, that mean first. So you have to set your headers before passing any output (echo, print_f ...)

Probably problems and solutions:
You are using echo, print, print_*, var_dump ... => You should use output class (view())

You are using wrong template parser (if you use some) => You should use native CI Template parser, or mine COMPER Template Parser

You have bad error messages system (not using Output class) => You should make error messages better way

You are using BOM => Delete BOM (BOM: http://en.wikipedia.org/wiki/Byte_order_mark)

Tom.[/quote]

Tominator has some good points here, and he is a genius, so listen up!

#6
[eluser]theprodigy[/eluser]
another problem could be a blank line after the closing php tag in a controller, model, library, etc.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.