Header Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Daniela
Forum Newbie
Posts: 3
Joined: Sun Oct 31, 2004 8:23 pm

Header Error

Post by Daniela »

Code: Select all

Warning: Cannot add header information - headers already sent by (output started at c:\inetpub\wwwroot\vitalhealth\salesclerks\area_salesclerks.php:2) in c:\inetpub\wwwroot\vitalhealth\salesclerks\area_salesclerks.php on line 74
I know this is a common problem. I've made sure the first thing on the page is the session initation and have checked for spaces.

What else could be the cause of the problem?

Thanks, Daniela.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Sending something to the user on or before line 2 in area_salesclerks.php:

(output started at c:\inetpub\wwwroot\vitalhealth\salesclerks\area_salesclerks.php:2)

Could be white space, tab, text....anything.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

any included files?
Daniela
Forum Newbie
Posts: 3
Joined: Sun Oct 31, 2004 8:23 pm

Post by Daniela »

Yes my connection variables are stored in an include file.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

check that for whitespace or any other output as well
Daniela
Forum Newbie
Posts: 3
Joined: Sun Oct 31, 2004 8:23 pm

Post by Daniela »

I've searched some forums and found some possible solutions to this problem.

- Okay, Thanks
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Read this

Post by neophyte »

rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

Daniela wrote:I've searched some forums and found some possible solutions to this problem.

- Okay, Thanks

fyi, using output buffering is not the solution to this problem. yes it may work, but that is putting a band aid over it. that and it can be a sig performance hit depending on the site.
Post Reply