Add System Check for BOM

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Add System Check for BOM

Post by cmb » Sat Apr 19, 2014 1:04 pm

Hello Community,

I just received a support request regarding a broken tracking image of Minicounter_XH. This image is dynamically generated by PHP. The cause was a BOM in one of the PHP files. Since CMSimple_XH 1.5.4 a respective error is shown, when there is a BOM in any of the PHP files, but not, if output_buffering is greater or equal than 3, in which case the BOM will usually go unnoticed (it has nothing to do with the PHP version, as I mistakenly stated in the other thread). However, a BOM will break any dynamically generated images and other binary files (e.g. downloads).

I suggest that we add a system check regarding the BOM. This will not be able to point out the very file that has a BOM, but at least it would clearly mark the issue.

Christoph
Last edited by cmb on Sat Apr 19, 2014 2:15 pm, edited 1 time in total.
Reason: changed Subject
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Add System Check for BOM

Post by cmb » Tue Jul 01, 2014 4:28 pm

Implementation note: it should be sufficient to scan ob_get_contents() for BOMs.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Add System Check for BOM

Post by cmb » Wed Aug 13, 2014 5:11 pm

Done (r1340).
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply