I have WordPress multisite install, everything was working properly. Developed a custom pugin on my local server (same configuration of Nginx, PHP, MySQL, Memcached, the only difference is OS - Windows 7 locally vs Ubuntu 14.04 LTS on server) and it works just fine. Plugin handles custom front-end reistration, login, password reset and user activation, custom profile page and profile editing (profiles are custom post type with some custom taxonomies). All forms are submitted via ajax. Everything works locally.

When I try to activate the plugin on a server it kind of activates but completely messes up cyrillic encoding and prints some code from my plugin files on top of the pages (frontend and backend).

Tried to disable all plugins and themes, revert to default. I even switched to new empty database, installed network again and activated on a fresh install. Same error.

I also have this function in one of my files:

add_action( 'init', 'feup_output_buffer' );
function feup_output_buffer() {



So it can't be 'header already sent' issue (and if yes - it would throw a php warning). Debug is on, no php errors, warning or notices. Any ideas?

Here's the screenshot

enter image description here

  • The ob_start must be the problem, there are any other functions like that one?
    – Tomás Cot
    Commented Sep 4, 2014 at 15:11
  • In my code - no. Maybe in other plugins. Checking right now. Commented Sep 4, 2014 at 15:16
  • Removed this function - problem is still present. Commented Sep 4, 2014 at 15:21
  • and, btw, ob_start is a stackable function so it allows multiple instances. Commented Sep 4, 2014 at 15:47
  • The problem is that it isn't used correctly PHP ends up flushing on EOF
    – Tomás Cot
    Commented Sep 4, 2014 at 15:56

2 Answers 2


Tried everything, finally rebuilt the plugin from ground up, split into several smaller ones. Installed and activated one by one and the problem was fixed. Everything works now.


If someone else stumbles upon this thread, the problem was likely caused by using the PHP short open tag feature (<? ?> vs. <?php ?>), whereas the short_open_tag directive was disabled on the server.

  • Sergey, thanks for your input. However, I NEVER use short open tags. Never used them since I started writing PHP code years ago. Commented Aug 31, 2015 at 9:48
  • I don't use them too, but yesterday found one that accidentally slipped in :) Anyway, that is the only scenario where I could reproduce this exact issue. Commented Aug 31, 2015 at 14:08
  • Yep, you're right. But in my case it wasn't the reason. However, I couldn't reproduce the issue again as I rewrote the code and the problem was somehow solved. I tend to think there was an extra byte before some opening tag. Commented Sep 1, 2015 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.