basically care should be taken about
encoding of the php files. they should be saved
without BoM
you can try using
PHP Files Cleaner plugin to clean the
php files
Im not sure if i understand how to use the php files cleaner
There is nothing listed in that tab after installing that
^ it is supposed to check php files when we access that tab.
the plugin can be also run from the plugins page. it should be having check files link at the plugin name.
When i click check files link, it sends me to the php cleaner tab with nothing on it like the attachment above.
Does that mean there is no problems regarding that, or that the plugin is not working right?
(2016-10-27, 05:23 PM)metulburr Wrote: [ -> ]When i click check files link, it sends me to the php cleaner tab with nothing on it like the attachment above.
Does that mean there is no problems regarding that, or that the plugin is not working right?
Have you tried from the plugins page?
Home » Board Settings » PHP Files Cleaner
Configuration:
Leading Whitespace and BOM
Allow clean-up of leading whitespace and Byte Order Mark (BOM)?
No
Trailing Whitespace and ?>
Allow clean-up of trailing whitespace and PHP ending tag (?>)?
No
Then select check files?
Because that way a whole bunch pops up right away!
Home » Board Settings » PHP Files Cleaner
Configuration:
Leading Whitespace and BOM
Allow clean-up of leading whitespace and Byte Order Mark (BOM)?
Yes
Trailing Whitespace and ?>
Allow clean-up of trailing whitespace and PHP ending tag (?>)?
Yes
Then select check files?
Not much pops up at first except:
Quote:PHP Files Cleaner
No functionality is enabled in plugin's settings at this moment.
But..., if you wait a few seconds..., stuff will pop up
So no there appears to be no issue with the plugin
Quote:So no there appears to be no issue with the plugin
Quote:Because that way a whole bunch pops up right away!
Quote:But..., if you wait a few seconds..., stuff will pop up
I give it quite a bit and nothing pops up
(2016-10-27, 09:53 PM)metulburr Wrote: [ -> ]Quote:So no there appears to be no issue with the plugin
Quote:Because that way a whole bunch pops up right away!
Quote:But..., if you wait a few seconds..., stuff will pop up
I give it quite a bit and nothing pops up
Dang.., dunno as I know nothing about this plugin prior to installing it quickly during reading this thread..., and on my install it took less than 40 seconds to display no matter the configuration settings but I only tried it on a localhost on OS X and a localhost via android as I did not have any other *nix box to play with.
If clean:
Alternate options in config results:
researching ways to bypass this plugin and just remove the bom manually....it doesnt look like there are any files with bom in my plugins if i did it correctly
metulburr /var/www/metulburr.com/inc/plugins $ printf '\xef\xbb\xbf' > my_file_with_BOM
metulburr /var/www/metulburr.com/inc/plugins $ sudo grep -rlI $'\xEF\xBB\xBF' .
[sudo] password for metulburr:
./my_file_with_BOM
metulburr /var/www/metulburr.com/inc/plugins $ file -i my_file_with_BOM
my_file_with_BOM: text/plain; charset=utf-8
metulburr /var/www/metulburr.com/inc/plugins $ file -i hazPhide.php
hazPhide.php: text/x-php; charset=us-ascii
etulburr /var/www/metulburr.com/inc/plugins $ file -i tagging.php
tagging.php: text/x-php; charset=us-ascii
metulburr /var/www/metulburr.com/inc/plugins $ file -i unreadPosts.php
unreadPosts.php: text/x-php; charset=us-ascii
I also had a tool that finds culprits:
https://community.mybb.com/thread-47354-...#pid347635
But it's super old, I never tried it with MyBB 1.8, you might have to edit compatibility and things.
You'll probably also have to ignore "no ?> at the end" messages, MyBB apparently no longer uses them, so spaces after ?> should not be a problem anymore. (And it's not smart enough to figure out PHP syntax)
You should actually have a look at what the attachment results in, a hexeditor would show if it's byte order mark, or something else. If it's something else it might be a string you can grep for directly. Rather than just a PHP formatting accident, it can also be bad code that prints stuff when it should not.