You are here: Re: [PHP] Re: Session warning « PHP « IT news, forums, messages
Re: [PHP] Re: Session warning

Posted by Rasmus Lerdorf on 10/21/16 11:21

On Sat, 16 Jul 2005, Thomas Bonham wrote:
> Jasper Bryant-Greene wrote:
> > Thomas Bonham wrote:
> >
> >> Hello All,
> >> I'm working on session and I'm getting this warning. Maybe someone can
> >> help fixing this problem. Below is the following code.
> >>
> >> Warning: Warning: session_start() [function.session-start]: Cannot
> >> send session
> >> cookie - headers already sent by (output started at
> >> /var/www/html/bonham/cornerstone-data/property/adminlogin.php:2) in
> >> /var/www/html/bonham/cornerstone-data/property/adminlogin.php on line
> >> 3
> >
> >
> > Are you absolutely sure that there is *no* output before the
> > session_start() in adminlogin.php?
> >
> > If there is it won't work. Even a space before the first <?php, or a
> > Unicode BOM, or any kind of output can screw it up.
> >
> > Jasper
>
> The first thing at is in my code is the start session command.

The error message indicates that your start_session() call is on line 3
and that output was started at line 2. Try pasting the first 5 lines of
that adminlogin.php script here. The other thing that is normally useful
is to have a look at the raw bytes in the file. Try this:

od -c adminlogin.php | head

from your command line. That will tell you exactly what is in the file.
Sometimes editors try to be a little bit too smart for their own good.

-Rasmus

 

Navigation:

[Reply to this 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

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