FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » session question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: session question [message #177757 is a reply to message #177745] Fri, 20 April 2012 09:25 Go to previous messageGo to previous message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma:
Senior Member
On 4/20/2012 8:40 AM, William Gill wrote:
> On 4/13/2012 1:51 PM, William Gill wrote:
>
>> ...my testing confirms that you are correct, placing the
>> session_start() on the core page does not produce errors on subsequent
>> GETS or POSTS. Which makes logical sense, but seemed to conflict with
>> the manual. Thanks, helping clear that up.
>>
> After all this, I move the pages from a Windows development server to a
> Linux production server and even though <?php session_start(); ?> is
> before the DOCTYPE declaration I get "Cannot send session cache limiter
> - headers already sent..."
>
> Only way that got rid of the error was to use an .htaccess file to auto
> start sessions for that folder.
>
>

Hi,

That error means you DID send output before calling session_start().
Try to figure out if you are including anything before that line that
might produce the output, even a SPACE or NEWLINE is output.

I do sometimes use the .htaccess to autostart sessions for a folder: it
is convenient in some situations: nothing wrong with that.
But you better try to find out WHAT is producing output before your
session_start() call.

I would start with:
1) replace the session_start() call with
echo "**TESTING**";
2) Check the output to your browser and see what appears before
**TESTING**, and from there try to figure out what is responsible for
the output before **TESTING**.


Regards,
Erwin Moller

--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Date/Time warning
Next Topic: How to create an instance from a class name
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 10:50:12 GMT 2024

Total time taken to generate the page: 0.05170 seconds