Unable to add cookies, header already sent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ttiger
    New Member
    • Jul 2003
    • 27

    Unable to add cookies, header already sent

    Anyone know why I'm getting this error? Just had it happen out of the blue. I didn't change anything and the board was running fine before this.

    Here is the error:
    Warning: Invalid argument supplied for foreach() in /home/user1/public_html/forums/includes/sessions.php on line 266




    Unable to add cookies, header already sent.
    File: /home/user1/public_html/forums/includes/sessions.php
    Line: 266
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    Either youve hacked somthing in sessions.php file incorrectly.

    reupload a default version of includes/sessions.php in ASCII mode.

    Comment

    • ttiger
      New Member
      • Jul 2003
      • 27

      #3
      As I said before. I did not change a single thing. It was working fine and then woke up this morning and this happened.

      I have already tried clearing my cookies several times, I reloaded all of the original vbulletin files and I tried doing a repair on the database.

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        If this is the case you should open a support ticket in the members area. you should include an admin account with full permissions and ftp access so they can take a look.

        Comment

        • Scott MacVicar
          Former vBulletin Developer
          • Dec 2000
          • 13286

          #5
          Language error, i'd check that your language table is off MyISAM type and not InnoDB type.
          Scott MacVicar

          My Blog | Twitter

          Comment

          • ttiger
            New Member
            • Jul 2003
            • 27

            #6
            I just checked all tables are MyISAM type except "session" which is HEAP type.

            Comment

            • Nombie Wan
              Senior Member
              • Apr 2003
              • 202
              • 3.0.0 'Gold'

              #7
              This is really strange guys, there's got to be something going on. Our board has been great since monday, woke up this morning, and I have same exact error.
              http://www.teamxbox.com

              Comment

              • ttiger
                New Member
                • Jul 2003
                • 27

                #8
                Well I guess its good to hear its not just me.

                Comment

                • Nombie Wan
                  Senior Member
                  • Apr 2003
                  • 202
                  • 3.0.0 'Gold'

                  #9
                  OK, after some searching I found Freddie's fixoptions.php, I had to alter it though, cause I think functions have moved around since he first created it. Here it is attached. Run this from your forums root directory and you'll be back in business.
                  Attached Files
                  http://www.teamxbox.com

                  Comment

                  • Nombie Wan
                    Senior Member
                    • Apr 2003
                    • 202
                    • 3.0.0 'Gold'

                    #10
                    Now, my questions is, what happened / is happening exactly? Sounds like there's still some sort of bug lingering. A fairly major bug if it leaves your board inoperable.
                    http://www.teamxbox.com

                    Comment

                    • ttiger
                      New Member
                      • Jul 2003
                      • 27

                      #11
                      Hey thanks man! Excellent job.

                      Comment

                      • Elyk
                        Senior Member
                        • Sep 2003
                        • 292
                        • 4.2.x

                        #12
                        Argh, same problem as above, ran fixoptions, still get same message for line 266 in sessions, cant add cookies, header already sent. Help!!!

                        Comment

                        • Steve Machol
                          Former Customer Support Manager
                          • Jul 2000
                          • 154488

                          #13
                          Elyk, please start your own thread with all the relevant details, include the complete error message and everything you've done to this point.
                          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                          Change CKEditor Colors to Match Style (for 4.1.4 and above)

                          Steve Machol Photography


                          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                          Comment

                          • Don Black
                            New Member
                            • May 2001
                            • 21
                            • 3.8.x

                            #14
                            There have been a number of threads about this.

                            I've had this problem seven or eight times since upgrading to vB3 beta last summer. It always happens during high server loads, such as during a mysqldump.

                            I'm now running Gold, and it just happened again, this time during normal operations, though still with an unusually high server load.

                            When I tried to run fixoptions.php, which always solved the problem in the past, I got:

                            "Rebuilding options
                            Fatal error: Unknown function: build_datastore() in /home/sf2/public_html/forum/includes/adminfunctions.php on line 1785"

                            I had to upload the adminfuntions.php from the RC4 build to get it to work.

                            Comment

                            • Nombie Wan
                              Senior Member
                              • Apr 2003
                              • 202
                              • 3.0.0 'Gold'

                              #15
                              Originally posted by Don Black
                              There have been a number of threads about this.

                              I've had this problem seven or eight times since upgrading to vB3 beta last summer. It always happens during high server loads, such as during a mysqldump.

                              I'm now running Gold, and it just happened again, this time during normal operations, though still with an unusually high server load.

                              When I tried to run fixoptions.php, which always solved the problem in the past, I got:

                              "Rebuilding options
                              Fatal error: Unknown function: build_datastore() in /home/sf2/public_html/forum/includes/adminfunctions.php on line 1785"

                              I had to upload the adminfuntions.php from the RC4 build to get it to work.
                              They changed where the build_datastore() function is declared, now in /functions.php since gold. I added an include to the file and attached it above in my other post. That file will work with Gold.

                              Can we get an explanation from someone on this issue? I suspect it has something to do with cron. I run text and straight backups every night and I think these may be interrupting a vB cron job that runs this function. Not sure, but some insight would be great.
                              http://www.teamxbox.com

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...