Welcome to Geeklog, Anonymous Thursday, September 19 2024 @ 05:54 pm EDT

Geeklog Forums

Cannot modify header error but white space is gone


Status: offline

jordydme

Forum User
Full Member
Registered: 11/03/05
Posts: 135
Hey folks,

i am using the suggestion block hack. It has been working flawlessly on one of my GL sites but not this one in particular. I get this error message upon submitting a suggestion:
Text Formatted Code

Warning: Cannot modify header information - headers already sent by (output started at /home/jordydme/public_html/geeklog/suggest.php:7) in /home/jordydme/public_html/geeklog/lib-common.php on line 2607

 


i checked for any white space in the suggest.php file and found nothing. Here is the sugest.php file:

Text Formatted Code

<?php
   include('lib-common.php');
   global $_CONF;  
   $email="anonymous@anonymous.com";
   $adminemail = $_CONF['site_mail'];
   // Suggestion Box phpBlock created by Mr.GxBlock of http://www.gxblock.com Please don't remove this message.    
   echo COM_siteHeader();
   if($suggest != ''){
     if(strlen($suggest) < 10){
          echo COM_startBlock('Error');
          printf("Please go back and enter insert at unique message with at least 10 characters.");
          echo COM_endBlock();
          echo COM_siteFooter(true);
          exit();
          }
         if($suggest == '$textareamessage'){
          echo COM_startBlock('Error');
          printf("Please go back and enter insert at unique message with at least 10 characters.");
          echo COM_endBlock();
          echo COM_siteFooter(true);
          exit();
          }
          $suggest = str_replace(array(">", "<",""", "&"), array(">","<", """, "&"), $suggest);
          $suggest = stripslashes($suggest);
          $suggest = COM_checkWords($suggest);
      mail
      (
      "$adminemail",
      "From Your Suggestion Box - A New Request",
      "Name : $username from $REMOTE_ADDR
       Email : $useremail
       Note:
       $suggest
       ",
       "From: $useremailn"
      );
         echo COM_refresh($HTTP_REFERER);
         echo COM_startBlock('Your suggestion has been proccessed');
         printf("Thank you $username, you are now being transferring back to previous page. You may also <A HREF="$HTTP_REFERER">click here</A>.");
         echo COM_endBlock();
         echo COM_siteFooter(true);
         exit();
   }else{
         echo COM_startBlock('Error');
         printf("Please try again.");
         echo COM_endBlock();
         echo COM_siteFooter();
         exit();
   }
 ?>

 


Line 7 is this:

echo COM_siteHeader();

I tried swapping in the suggest.php file from my known working site but got the same error. The suggestion block works fine on one site but not the other site.

This is the bit of code that goes in the lib-custom:

Text Formatted Code
function phpblock_suggest(){
   global $_TABLES, $_CONF, $_USER;
   $message="what would you like to see here?";
   $siteurl = $_CONF['site_url'];  
   $display .="<CENTER>";
   if($_USER['username'] != ''){
   $display .="<B>$_USER[username], $message<B><BR>";
   }elseif($_USER['username'] == ''){
   $username = 'Guest';
   $useremail = 'anonymous@anonymous.com';
   $display .="<B>Hello Guest, $message<B><BR>";
   }
   if($_USER['username'] != ''){
        $result = DB_query("SELECT * FROM {$_TABLES['users']} WHERE username = '{$_USER['username']}'");
        $U = DB_fetchArray($result);
                $username = "$U[username]";
                $useremail = "$U[email]";
                if($useremail == ''){
                  $useremail = 'anonymous@anonymous.com';
                }
    }
   $display .="<FORM ACTION="$siteurl/suggest.php" METHOD="POST">";
   $display .="<TEXTAREA ROWS="3" COLS="15" NAME="suggest">


 
 Quote

All times are EDT. The time is now 05:54 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content