header error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brooklynbeats
    New Member
    • Jul 2001
    • 10

    header error

    Ok I am new at this PHP thing I am consantly running into this error <<can't add header information>> can some one please tell me what I am doing wrong???
    Please
    Ryan
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    Without the actual, real error message, in general we can't.

    But I can guess that you have whitespace after the ?> in your config.php.

    Comment

    • brooklynbeats
      New Member
      • Jul 2001
      • 10

      #3
      Warning: Cannot add header information - headers already sent by (output started at /home/cust2/usr2029/html/bull/index.php:2) in /home/cust2/usr2029/html/bull/global.php on line 322

      That is the error that I am getting....

      Thanks for the help....................

      Comment

      • Mike Sullivan
        Former vBulletin Developer
        • Apr 2000
        • 13327
        • 3.6.x

        #4
        Ok then, remove any whitespace before the <?php in index.php. That should fix it.

        Comment

        • brooklynbeats
          New Member
          • Jul 2001
          • 10

          #5
          #!/usr/local/bin/php
          <?php
          require ("global.php");

          if (isset($action)==0) {
          $action="frames";
          }

          if ($action=="phpinfo") {
          phpinfo();
          }

          if ($action=="frames") {
          ?>

          This is the first it of PHP in the index.php file I don't think there is any white space??? But I am pretty new to PHP.

          Thanks again for the help.
          ryan

          Comment

          • Mike Sullivan
            Former vBulletin Developer
            • Apr 2000
            • 13327
            • 3.6.x

            #6
            Actually, that's your admin/index.php, not the main vB directory version. But try this:

            #!/usr/local/bin/php<?php

            Comment

            • brooklynbeats
              New Member
              • Jul 2001
              • 10

              #7
              I am now getting a Parse error: parse error in /home/cust2/usr2029/html/bull/index.php on line 28
              AAAAAHHHHHHHHHHHHH...
              I really want to use this board on my site!!!!:confused: :confused:

              Comment

              • Mike Sullivan
                Former vBulletin Developer
                • Apr 2000
                • 13327
                • 3.6.x

                #8
                What version are you installing?

                Comment

                • brooklynbeats
                  New Member
                  • Jul 2001
                  • 10

                  #9
                  Lite

                  I am using the free Lite version.

                  Tha ks

                  Comment

                  • Mike Sullivan
                    Former vBulletin Developer
                    • Apr 2000
                    • 13327
                    • 3.6.x

                    #10
                    Hmm... line 28 is either empty or a } depending on which file you look at.

                    So I'd try reuploading a stock version of index.php and see if that helps.

                    Comment

                    • brooklynbeats
                      New Member
                      • Jul 2001
                      • 10

                      #11
                      Tried No dice

                      I tried that but I am still getting this error.....

                      Warning: Cannot add header information - headers already sent by (output started at /home/cust2/usr2029/html/bulletin/index.php:2) in /home/cust2/usr2029/html/bulletin/global.php on line 320

                      Warning: Cannot add header information - headers already sent by (output started at /home/cust2/usr2029/html/bulletin/index.php:2) in /home/cust2/usr2029/html/bulletin/global.php on line 323

                      I made sure there was no white space as well!

                      Lost and confused,
                      Ryan

                      Comment

                      • Stallion
                        Senior Member
                        • Apr 2000
                        • 704

                        #12
                        Are you sure you need to have the escape line in there? Most setups don't require it.

                        Comment

                        • Mike Sullivan
                          Former vBulletin Developer
                          • Apr 2000
                          • 13327
                          • 3.6.x

                          #13
                          Actually, it appears that you added the shebang line too too many files -- remove it from the global.php's, config.php and db_mysql.php and see if that helps.

                          Comment

                          • brooklynbeats
                            New Member
                            • Jul 2001
                            • 10

                            #14
                            No Dice

                            Ok I tried and I am still getting this header error!!!, I have uploaded all the files intact except fot the index.php which I add the #!/usr/local/bin/php <?phpinfo?> to the top. I am still getting, Warning: Cannot add header information - headers already sent by (output started at /home/cust2/usr2029/html/upload/index.php:2) in /home/cust2/usr2029/html/upload/global.php on line 319

                            Warning: Cannot add header information - headers already sent by (output started at /home/cust2/usr2029/html/upload/index.php:2) in /home/cust2/usr2029/html/upload/global.php on line 322

                            I have placed the forum here brooklynbeats.com/upload
                            What am I doing wrong. I am running on PHP 4.0.6.

                            :confused: :confused: :confused: :confused: :confused:

                            Comment

                            • Mike Sullivan
                              Former vBulletin Developer
                              • Apr 2000
                              • 13327
                              • 3.6.x

                              #15
                              Well, FWIW, when I view the page source, there's an extra blank line at the top. Which means a file is still outputting an extra line.

                              Make sure you don't have any extra spaces anywhere either.
                              (Like:
                              #!/usr/local/bin/php-
                              <?php
                              where the - is a space)

                              Comment

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