Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR

Status
Not open for further replies.

Meekos

Technical User
Feb 6, 2004
39
US
Can anyone point me in a troubleshooting direction for this error message? This site was working great until I moved over to a new server. I'm not sure if a setting in the php.ini file needs changing or what.

Here is the message.

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/home/gfaith/public_html/admin/inc/adminheader.inc:1) in /usr/home/gfaith/public_html/admin/inc/adminheader.inc on line 3

Please let me know if you need more details.
Meekos
 
headers already sent means text was already sent to the client and therefore cannot call certain functions, like header() and session_start().

make sure it's at the top of your code, before ANY text (including whitespace).

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
sleipnir's faq: faq434-2999

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
I have seen this kind of "headers already sent" error before. The two causes for myself (may be different for you though) were:

1) I accidentally had session_start() in an include file as well as in my main body of code.

2) I sent HTML to the output before a session_start()

The second one I'm more vague on as I can't remember it too well.

However these were in PHP4. I have PHP5 installed on a machine next to me and number 2 does not generate a problem, and number 1 now gives me the notice:

"A session had already started"

Not much help I'm afraid but perhaps it will give you a few ideas.
 
Thanks for all your help. After running PHPINFO(), it was discovered that GD was not turned on.

Thanks again for the tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top