Kayako logo
Feature Requests Have a feature request for SupportSuite, eSupport and LiveResponse? Post in here.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,033
Join Date: Jan 2006
Location: United Kingdom
Use PHP output buffering - 17-06-2007, 12:14 PM

To resolve any "Error: headers already sent" errors

http://www.codewalkers.com/c/a/Misce...put-Buffering/


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • New to the forum? New user's guide here.
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
   
Reply With Quote
  (#2) Old
Chris Boulton Offline
Member
 
Posts: 146
Join Date: Jun 2003
Location: Sydney, Australia
17-06-2007, 12:50 PM

Output buffering is dodgy.

For that to work correctly, you'd have to have the ob_start() line in config.php. Why? So the output buffering starts there. If you had it anywhere else it would not have any effect on empty lines/output in config.php.

Secondly, output buffering holds up the entire page contents from being delivered to the browser until either the end of script execution or ob_flush() is called.

A better solution, albeit slightly more "hacky" is to drop the trailing ?> off any files which are included. For example:
PHP Code:
<?php
$config
['db_type'] = "localhost";
....
Not having the trailing ?> causes PHP to think it is still in execution mode for the rest of the file.

[edit] The best solution is to completely stop execution on one of the errors.
   
Reply With Quote
Reply

Tags
buffering, output, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
GoPHP5 BigTom3007 Comments, Questions & Feedback 10 15-05-2008 08:10 AM
Setup PHP on a Windows 2000 server netFusion Technical Chat 5 03-10-2007 09:01 AM
dynamic php includes in smarty templates ebyte.com SupportSuite, eSupport and LiveResponse 3 04-06-2007 08:22 PM
mail parser not working netjunkie SupportSuite, eSupport and LiveResponse 8 14-06-2006 10:37 AM
Mail Parser - PHP Fatal error raiseAlert() bdwyer SupportSuite, eSupport and LiveResponse 3 10-05-2006 10:28 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46