Re: [PHP] Re: Warning when calling session_start()

2010-12-22 Thread Ravi Gehlot
session_start (); should be before everything...first thing in the page.

Ravi.


On Wed, Dec 22, 2010 at 12:51 AM, web...@blaettner.com wrote:

 Hi, folks,

 On Tue, 21 Dec 2010 21:35:17 -0800 [06:35:17 AM CET],
 Michael Shadle mike...@gmail.com wrote:

  first - this is probably your culprit:
  don't output empty lines before you do
  anything (just a general good practice)

 Whow! This did the trick !

 Warning vanished when I changed beginning of
 script to:

 1 ?php session_start ();
 2

 I wasn't aware that the HTML comment and the
 following empty line are in fact written to
 output.  But that's clear now  :-)

 So I suppose my local PHP setup supressed this
 warning or is more compliant ...

  also i'd turn on output buffering.

 Since it worked without warning at 1st try,
 I haven't changed output buffering (yet).

 Mike, many thanks for Your PROMPT and HELPFUL
 answer! Have a nice day!

 Rolf
 --
 Dipl.phys. Rudolf Otto Blättner,
 D 91074 Herzogenaurach, Germany.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Warning when calling session_start()

2010-12-22 Thread Daniel P. Brown
On Wed, Dec 22, 2010 at 11:43, Ravi Gehlot r...@ravigehlot.net wrote:
 session_start (); should be before everything...first thing in the page.

Unlike the body of your email, Ravi, which is why I've asked you
before not to top-post.  Please follow the formats as outlined in the
list rules.

-- 
/Daniel P. Brown
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Warning when calling session_start()

2010-12-21 Thread webdev
Hi, folks,

On Tue, 21 Dec 2010 21:35:17 -0800 [06:35:17 AM CET],
Michael Shadle mike...@gmail.com wrote:

 first - this is probably your culprit:
 don't output empty lines before you do
 anything (just a general good practice)

Whow! This did the trick !

Warning vanished when I changed beginning of
script to:

1 ?php session_start ();
2

I wasn't aware that the HTML comment and the
following empty line are in fact written to
output.  But that's clear now  :-)

So I suppose my local PHP setup supressed this
warning or is more compliant ...

 also i'd turn on output buffering.

Since it worked without warning at 1st try,
I haven't changed output buffering (yet).

Mike, many thanks for Your PROMPT and HELPFUL
answer! Have a nice day!

Rolf
-- 
Dipl.phys. Rudolf Otto Blättner,
D 91074 Herzogenaurach, Germany.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php