Reply to Re: how do I fix this " Warning: session_start(): Cannot send session cache limiter"

Your name:

Reply:


Posted by Jerry Stuckle on 06/18/06 15:14

lawrence k wrote:
> NC wrote:
>
>>lawrence k wrote:
>>
>>>How can I find out where my script is outputting to the screen
>>>for the first time?
>>
>>It may not be your script; it could be one of the files you are
>>including...
>>
>>
>>>My error logs are full of stuff like this:
>>
>>...
>>
>>>but the lines they are pointing to are
>>>
>>> session_start();
>>> session_register();
>>
>>You probably have a blank space or an empty line somewhere between the
>>beginning of a file and the first "<?"... Find it and delete it.
>>Alternatively, use output buffering; start buffering at the beginning
>>of the script and dump the buffer after you're done working with
>>sessions...
>
>
> Well, I probably do have some open white space in the code. I did a
> search for it and found at last 6 files that were leaking white space.
> I fixed those 6 files. Sadly, my error logs are still full of "Warning:
> session_start(): Cannot send session cache"...
>
> I'm going crazy. I can't set sessions because my code is leaking white
> space. I can't find a way to track down that white space. Surely there
> is an IDE or test kit that will help me track this down?
>

First of all, maybe "every function and class has its own file" is a bit
overkill. I usually group things together - especially functions. Even if you
include some unused functions, so what? And you'll save the time necessary to
locate and load dozens of individual files.

Also, turn on all errors and display the errors. You'll get a message to the
effect "Output was started at line xxx in file yyy", which tells you where the
code or whitespace caused the headers to be sent.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация