501 posts
  • Has referred 1000+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+8 more
pixelentity says

We just had a very nasty issue in a recent theme: some buyers complained about “Headers already sent” warning upon theme activation which caused massive boos like getting blank pages, being unable to login or create new pages and so on.

The issue was caused by a single extra (damn) newline char placed after a closing ”?>” in one of the theme classes file but the real question for us was “how the f**k this didn’t happen with any of the multiple wp installations running on different servers/platforms where we had tested theme ?”

So today, after a bit of research, we figure out that when php outbut_buffering option is enabled, you most likely never get a “Headers already sent” warning. We had it enabled in all our php installations like any other buyer not experiencing the issue.

Our friendly advice would be to turn that option off for your testing machine, i don’t know if theme/plugin installation is part of the review process but if it’s the case, reviewers should also disable output buffering.

BF

3259 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Yep closing PHP tag is generally not used, especially on class files.

see zend coding guide: http://framework.zend.com/manual/1.12/en/coding-standard.php-file-formatting.html#coding-standard.php-file-formatting.general

and php docs say its not required: http://docs.php.net/manual/en/language.basic-syntax.instruction-separation.php

always a touchy point with devs though :)

personally I tend to skip the end closing tag because of a bad hidden white space issue in a utf8 encoded file i had ages ago after transferring it via ftp.

110 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in Australia
+2 more
AGSoft says

see zend coding guide: http://framework.zend.com/manual/1.12/en/coding-standard.php-file-formatting.html#coding-standard.php-file-formatting.general
“Indentation should consist of 4 spaces. Tabs are not allowed.” Tabs > spaces. :/
3072 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item featured on Envato Market
+5 more
wickedpixel says

Hm, I had that error, I repaired it but never knew the real source. Thanks for sharing. :)

4354 posts ThemeForest Reviewer
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Member of the Envato Team
+12 more
Ivor Envato team says

I don’t know if theme/plugin installation is part of the review process but if it’s the case, reviewers should also disable output buffering.

I use MAMP and output_buffering is off by default. Thanks for the advice though.

501 posts
  • Has referred 1000+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+8 more
pixelentity says

Yep closing PHP tag is generally not used, especially on class files.
that’s not the only case, it could also happen with BOM headers: some editors just hide them so one won’t notice until buyers start chasing you armed with forks.

BF

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by