Please fix my error after installation successful!

Discussion in 'PHP' started by sheriffonline, Sep 24, 2008.

  1. #1
    Hi,

    i just installed the wallpaper script on my new domain http://wallpaperscity.com

    installation was successfuly and which said to remove the install folder.

    when i visit the site now http://wallpaperscity.com which shows following errors.

    A PHP Error was encountered

    Severity: Warning

    Message: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home2/wall/public_html/index.php:235)

    Filename: libraries/Session.php

    Line Number: 140

    please help me to fix this error.

    Thank you in advance
     
    sheriffonline, Sep 24, 2008 IP
  2. Funk-woo10

    Funk-woo10 Peon

    Messages:
    1,108
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    have you looked at line 140 in that file -libraries/Session.php?
     
    Funk-woo10, Sep 24, 2008 IP
  3. sheriffonline

    sheriffonline Well-Known Member

    Messages:
    1,650
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    160
    Digital Goods:
    1
    #3
    yes. i checked already. this is the code

    // Set the cookie name
    if ($this->CI->config->item('sess_cookie_name') != FALSE)
    {
    $this->sess_cookie = $this->CI->config->item('cookie_prefix').$this->CI->config->item('sess_cookie_name');
    } (line number 140)

    /*
     
    sheriffonline, Sep 24, 2008 IP
  4. juust

    juust Peon

    Messages:
    214
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Your first output to the browser starts at /home2/wall/public_html/index.php:235 (probably an error message, some debug info), check what function is called at that line ?
     
    juust, Sep 24, 2008 IP
  5. ads2help

    ads2help Peon

    Messages:
    2,142
    Likes Received:
    67
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Try this.
    Put this on the very top (MOST TOP) of your file JUST after <?php
    <?php
    obstart();
    PHP:
    if you use include() to include template/page, make sure you put it at the top first file (eg: header.php)

    and this at the most BOTTOM of last file/page. JUST before ?>
    ob_end_flush();
    ?>
    PHP:
    see if it works
     
    ads2help, Sep 25, 2008 IP