Re: [PHP] Re: Session warning
Thanks is for the help. That is a very good command. Here is what I have now. [EMAIL PROTECTED] property]$ od -c adminlogin.php | head 000 < ? p h p s e s s i o n _ s 020 t a r t ( ) ; r e q u i r e ( 040 " f u n c t l i b . p h p " ) ; 060 ? > \r \n < h t m l > \r \n 100 < h e a d > \r \n \t < t i 120 t l e > L o g i n < / t i t l e 140 > \r \n \t < l i n k r e l = " 160 s t y l e s h e e t " t y p e 200 = " t e x t / c s s " h r e f 220 = " . . / . . / c s s / t a b l [EMAIL PROTECTED] property]$ Also I gess I can't have the null line at the top of my file. Again Thanks of the help. Thomas On 7/16/05, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > Thomas Bonham wrote: > > Ok that is some help. > > > > The first five lines of the file are the following. > > > > > > >session_start(); > >require("functlib.php"); > >?> > > > > od -c adminlogin.php | head out put the folowing. > > > > [EMAIL PROTECTED] property]$ od -c adminlogin.php | head > > 000 \r \n < ? p h p \r \n \t s > > 020 e s s i o n _ s t a r t ( ) ; \r > > 040 \n \t r e q u i r e ( " f u n c > > 060 t l i b . p h p " ) ; \r \n > > 100 ? > \r \n < h t m l > \r \n > > 120 < h e a d > \r \n \t < t i > > 140 t l e > C I S 1 6 6 A E - A > > 160 d m i n L o g i n < / t i t l > > 200 e > \r \n \t < l i n k r e l = > > 220 " s t y l e s h e e t " t y p > > well, there is your answer. Your file starts with \r\n > So your PHP tag is not the first thing in your file and PHP will output > that leading \r\n. > > -Rasmus > -- -- Thomas Bonham [EMAIL PROTECTED] bonhamlinux.org Cell 602-402-9786 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Session warning
Thomas Bonham wrote: > Ok that is some help. > > The first five lines of the file are the following. > > >session_start(); >require("functlib.php"); >?> > > od -c adminlogin.php | head out put the folowing. > > [EMAIL PROTECTED] property]$ od -c adminlogin.php | head > 000 \r \n < ? p h p \r \n \t s > 020 e s s i o n _ s t a r t ( ) ; \r > 040 \n \t r e q u i r e ( " f u n c > 060 t l i b . p h p " ) ; \r \n > 100 ? > \r \n < h t m l > \r \n > 120 < h e a d > \r \n \t < t i > 140 t l e > C I S 1 6 6 A E - A > 160 d m i n L o g i n < / t i t l > 200 e > \r \n \t < l i n k r e l = > 220 " s t y l e s h e e t " t y p well, there is your answer. Your file starts with \r\n So your PHP tag is not the first thing in your file and PHP will output that leading \r\n. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Session warning
Ok that is some help. The first five lines of the file are the following. od -c adminlogin.php | head out put the folowing. [EMAIL PROTECTED] property]$ od -c adminlogin.php | head 000 \r \n < ? p h p \r \n \t s 020 e s s i o n _ s t a r t ( ) ; \r 040 \n \t r e q u i r e ( " f u n c 060 t l i b . p h p " ) ; \r \n 100 ? > \r \n < h t m l > \r \n 120 < h e a d > \r \n \t < t i 140 t l e > C I S 1 6 6 A E - A 160 d m i n L o g i n < / t i t l 200 e > \r \n \t < l i n k r e l = 220 " s t y l e s h e e t " t y p [EMAIL PROTECTED] property]$ Thanks Thomas On 7/16/05, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > 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 > > 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 > -- -- Thomas Bonham [EMAIL PROTECTED] bonhamlinux.org Cell 602-402-9786 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Session warning
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 > 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session warning
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 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. Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session warning
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 Unicode BOM, or any kind of output can screw it up. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php