Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#815 closed defect (fixed)

Header information already sent

Reported by: jameskirsop Owned by: sambauers
Priority: high Milestone: 0.9
Component: Front-end Version: 1.0-rc-2
Severity: critical Keywords:
Cc:

Description

Here's a bunch of errors I'm getting.

During install process:

Warning: Cannot modify header information
 - headers already sent by (output started at /Users/jameskirsop/Sites/bbpress/branches/0.8/bb-config.php:38) in
/Users/jameskirsop/Sites/bbpress/branches/0.8/bb-includes/functions.php on line 2248

and after installing successfully (using trunk/0.8 to install) and trying to login (browsing to bb-login.php) I get the following - with nothing else on the page.

Warning: Cannot modify header information 
- headers already sent by (output started at /Users/jameskirsop/Sites/bbpress/trunk/bb-config.php:38) in
/Users/jameskirsop/Sites/bbpress/trunk/bb-includes/backpress/class.wp-auth.php on line 201

Warning: Cannot modify header information 
- headers already sent by (output started at /Users/jameskirsop/Sites/bbpress/trunk/bb-config.php:38) in
/Users/jameskirsop/Sites/bbpress/trunk/bb-includes/backpress/class.wp-auth.php on line 201

Warning: Cannot modify header information 
- headers already sent by (output started at /Users/jameskirsop/Sites/bbpress/trunk/bb-config.php:38) in
/Users/jameskirsop/Sites/bbpress/trunk/bb-includes/pluggable.php on line 154

Running PHP Version 5.2.4 on Apache2 if that helps at all.

Change History (7)

Edit your bb-config.php file and make sure there's no whitespace (or any other character) after the

?>

at the end of the file.

  • Owner set to sambauers

sambauers, what do you think about having the installer create a bb-config.php file without a closing

?>

?

(See Note on http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php)

  • Milestone set to 0.9
  • Version set to 1.0-alpha (trunk)
  • Status changed from new to assigned

That wouldn't be a hard change.

Perhaps it's better that I just trim off whitespace at the start and end of the file when it's created though.

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [1275]) Trim trailing whitespace from config file output in installer. Fixes #815

(In [1276]) Trim trailing whitespace from config file output in installer for branches/0.8 See #815

If the output/file has no ending "?>" then people might think the output/file was incompletely rendered/written.

Note: See TracTickets for help on using tickets.