ERROR:Cannot modify header information.

A place to discuss and receive support for the Web Auction application.

ERROR:Cannot modify header information.

Postby r0n2990 » Mon Dec 17, 2007 5:31 pm

Hey guys again,

I hid the tables easily enough. But now when i try to edit or add a record it shows me this error.

Warning: Cannot modify header information - headers already sent by (output started at /var/www/Craigleith/conf/ApplicationDelegate.php:86) in /var/www/dataface/actions/new.php on line 147


This error i think refers the addition of the message at the top of the page about "Entry saved" or "Entry edited". I do not know what part of this my new ApplicationDelegate.php it is reffering to because it shows as the line number as the end of the code. So I don't know where I screwed up the headers.

Code: Select all
getLoggedInUser();
         if ( !isset($user) ) return Dataface_PermissionsTool::READ_ONLY();
          $role = $user->val('role');
       if ( isAdmin() ){
         return Dataface_PermissionsTool::ALL();
         }elseif ( $role == 'EDIT'){
         return Dataface_PermissionsTool::getRolePermissions(EDIT);
         }else{
         return Dataface_PermissionsTool::READ_ONLY();
         }
    }
   
    function block__custom_stylesheets(){
        echo '';
    }
   
    function block__after_application_menu(){
       
        $categories = $this->getCategoriesMenuOptions();
        df_display(array('categories'=>&$categories), 'categories_menu.html');
   
    }
   
    function block__before_main_column(){
        if ( isAdmin() ) {
            $sql = "select sum(bid_amount) from bids b where not exists ( select bid_id from bids b2 where b2.product_id=b.product_id and b2.bid_amount > b.bid_amount) and exists ( select product_id from products p where p.product_id=b.product_id)";
            $res = mysql_query($sql, df_db());
            list($amt) = mysql_fetch_row($res);
            echo "
Total Bids Currently: \$".number_format($amt,2).'
';
        }
    }
   
    function getCategoriesMenuOptions(){
        $sql = "select p.product_id, pc.category_id, pc.category_name, count(*) as num from products p inner join product_categories pc on p.product_categories rlike concat('[[:<:]]',pc.category_id,'[[:>:]]') group by pc.category_id";
        $res = mysql_query($sql, df_db());
        $out = array();
        while ( $row = mysql_fetch_assoc($res) ) $out[] = $row;
        return $out;
   
    }
   
    function getPreferences()
   {
     $app =& Dataface_Application::getInstance();
      $query =& $app->getQuery();
      $tables =& $app->_conf['_tables'];
      $auth =& Dataface_AuthenticationTool::getInstance();
      $user =& $auth->getLoggedInUser();
      if ( !isset($user) ) {
               return array(
                  'show_tables_menu'=>0,
                  'show_table_tabs'=>0,
                  'show_record_tree'=>0,
                  'show_record_tabs'=>0,
                  'show_result_controller'=>0);
            }
      $role = $user->val('role');
      if ( $query['-table'] == 'products' and !isset($query['-sort']) ){
         $query['-sort'] = 'product_categories asc';
      }
      closeAuctions();   
      if ( $role == 'EDIT' ){
         unset($tables['bids'],$tables['users'],$tables['fundraiser_information']);
      }
      if ( $role == "ADMIN" or $role == 'EDIT' ){
            return array('show_record_tree'=>0);
            }else{
               return array(
                  'show_tables_menu'=>0,
                  'show_table_tabs'=>0,
                  'show_record_tree'=>0,
                  'show_record_tabs'=>0,
                  'show_result_controller'=>0);
            }
   }   

}

?>


Any help would be appricated.
Also is there a search feature in the phpBB that I cannot find?
r0n2990
 
Posts: 9
Joined: Thu Dec 13, 2007 5:02 am

Postby Nicole » Tue Dec 18, 2007 4:26 am

Search is in upper right corner... searches Forum and entire site.

Good luck!
-Nicole
Nicole
 
Posts: 6
Joined: Sun Dec 16, 2007 2:25 am

Postby r0n2990 » Tue Dec 18, 2007 3:18 pm

Thank you for that tidbit of information and i found my problem... I was white space.

Thanks again.
-Cam
r0n2990
 
Posts: 9
Joined: Thu Dec 13, 2007 5:02 am


Return to Web Auction Discussion

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved