Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6

Thread: Argh php help?

  1. #1
    Join Date
    Feb 2008
    Location
    Plymouth
    Posts
    1,073
    Tokens
    0

    Latest Awards:

    Default Argh php help?

    Hey guys, I keep getting this STUPID error, it may be something totally obvious or the fact I haven't stopped coding for the past few days and getting tired

    Basically I'm building a CMS and when the user logs in I want it to display "Hi $username welcome to the panel!';

    So I create a welcome.php file and use a php include in the box I want it to display the text but it displays it but I get a stupid cache error :S

    PHP Code:
    Warning:  session_start() [function.session-start]: Cannot send session cache limiter headers already sent (output started at /home/igoboy/public_html/cms/userpanel.php:6in /home/igoboy/public_html/cms/welcome.php on line 9
    Hi lucas
    welcome to your panelYou have 0 new messages since you last logged in
    Any ideas guys? Also I've checked the code and it looks fine.

    Moved by jesus (Forum Super Moderator) from Designing & Development: Please post in the correct section next time.
    Last edited by jesus; 04-04-2008 at 10:26 PM.

  2. #2
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    You have session_start(); on an included page and the page you are including on.

  3. #3
    Join Date
    Feb 2008
    Location
    Plymouth
    Posts
    1,073
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Robbie! View Post
    You have session_start(); on an included page and the page you are including on.
    Nope, I've only included the file into the userpanel, haven't started any sessions.

    PHP Code:
    <div id="box"><?php include("welcome.php"); ?></div>
    Thats the only php I have in my userpanel atm (started a new one)

  4. #4
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    I do believe sessions cannot be initialized after html is outputted. Not completely sure though.

  5. #5
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    I do believe sessions cannot be initialized after html is outputted. Not completely sure though.
    This is correct, initialize them at the top of the page before any HTML.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  6. #6
    Join Date
    Feb 2008
    Location
    Plymouth
    Posts
    1,073
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    I do believe sessions cannot be initialized after html is outputted. Not completely sure though.
    Ahh crap, thanks anyway
    I can just put it in the userpanel.php file but when I do that php has to be at the top, and it displays "Welcome lucas" at the top of the page rofl.

    @Lolcopters - Yeah I put the whole of welcome.php at the top of the page before inserting html but then it just went to the top so I thought ohh.. php include
    Last edited by Bojangles; 04-04-2008 at 10:15 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •