How to handle “The plugin generated x characters of unexpected output” errors in WordPress

Some errors are hard to trace, especially when no line of error or function/variable is

If you ever ecounter “The plugin generated x characters of unexpected output” in your WordPress plugin development, a simple solution is to include the following line in your function/method:

file_put_contents(__DIR__ . '/activation_log.txt', ob_get_contents());

This will write any output to a file in the current directory where the file containing the function/method resides.

Advertisements

Collection of various Postfix/Dovecot configuration scenarios

The order is NOT random:

INSTALLING A FULLY FLEDGED, READY TO USE MAILSERVER ON CENTOS 6 WITH POSTFIX, POSTGRESQL, AMAVIS, CLAMAV, SPAMASSASSIN AND DOVECOT:
• http://www.shisaa.jp/postset/mailserver-1.html
 – tested, fully working

A Mailserver on Ubuntu 14.04: Postfix, Dovecot, MySQL:
• https://www.exratione.com/2014/05/a-mailserver-on-ubuntu-1404-postfix-dovecot-mysql/
– tested, fully working

Ubuntu + Postfix + Courier IMAP + MySQL + Amavisd-new + SpamAssassin + ClamAV + SASL + TLS + Roundcube + Postgrey:
• http://flurdy.com/docs/postfix/#test-common

• http://www.krizna.com/centos/setup-mail-server-in-centos-6/

• https://www.rosehosting.com/blog/mailserver-with-virtual-users-and-domains-using-postfix-and-dovecot-on-a-centos-6-vps/

• http://www.yolinux.com/TUTORIALS/Postfix.html

• http://techarena51.com/index.php/configure-secure-postfix-email-server/