Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old February 1st, 2003, 01:41 PM
jimmy jimmy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 1 jimmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Headers --- Arghh

First of all thanks ben for this code. But I have followed it very carefullt to section 3 and all is working well with the database storing information etc, but I am getting these error messages below can you Ben or anyone else here help me.. PLEASE.

Thanks in advance.

Jimmy
Scotland

Page: class.security.php
line of code: session_start();
error: Warning: Cannot send session cookie - headers already sent by
error: Warning: Cannot send session cache limiter - headers already sent


Page: index.php
line of code: header("location:login.php?strMethod=checklogin");
error: Warning: Cannot add header information - headers already sent by

Reply With Quote
  #2  
Old March 19th, 2003, 09:37 AM
TheGhost TheGhost is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Beograd
Posts: 1 TheGhost User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Where are the other 5 articles ? Ben showed only part 1/6 ?

Reply With Quote
  #3  
Old March 20th, 2003, 12:14 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 52 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Quote:
Originally posted by TheGhost
Where are the other 5 articles ? Ben showed only part 1/6 ?


They are listed in the articles section.. you may have to scroll for them..

Reply With Quote
  #4  
Old March 20th, 2003, 12:15 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 52 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Re: Headers --- Arghh

Quote:
Originally posted by jimmy

Page: class.security.php
line of code: session_start();
error: Warning: Cannot send session cookie - headers already sent by
error: Warning: Cannot send session cache limiter - headers already sent


Page: index.php
line of code: header("location:login.php?strMethod=checklogin");
error: Warning: Cannot add header information - headers already sent by [/B]


Jimmy: Put ob_start(); at the very beginning of your index.php, just after the <?php

IE:
PHP Code:
<?
ob_start
();

and put ob_flush(); at the end of your page..

also, check and see if you are creating any other html before you start your php code, that can cause it too

Reply With Quote
  #5  
Old April 2nd, 2003, 11:41 AM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 6
And what does this actually do.
I have had some problems [Warning:] setting a cookie until I add these functions.

PHP Code:
<?
ob_start
();
                 
// Site
ob_flush(); 
?>

Reply With Quote
  #6  
Old April 2nd, 2003, 10:43 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 52 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Quote:
this is directly from php.net:

http://www.php.net/manual/en/function.ob-start.php

ob_start(); : This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.

The contents of this internal buffer may be copied into a string variable using ob_get_contents(). To output what is stored in the internal buffer, use ob_end_flush(). Alternatively, ob_end_clean() will silently discard the buffer contents.

ob_flush(); :

http://www.php.net/manual/en/function.ob-flush.php

This function will send the contents of the output buffer (if any). If you want to further process the buffer's contents you have to call ob_get_contents() before ob_flush() as the buffer contents are discarded after ob_flush() is called.



basically ob_start stores the output information, ob_flush then sends it to the browser..

Reply With Quote
  #7  
Old April 3rd, 2003, 01:38 AM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 6
ohh I see now, thanks for that,

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Headers --- Arghh


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway