0

I've got a custom wordpress site that locally is working fine. However on the staging server, on random occasions it outputs just the html, partially incomplete. The output always seems to be missing a portion of the top part of the html, but with a random on the second line, and a 0 at the end of the page.

This is an image of what is outputted

I'm thinking this is a buffer issue. Has anyone had this issue or could shed some light on it?

-- Edit This general happens most when accessing the backend pages. I'm certain it must be some server related setting that is causing this. Maybe buffer size?

9
  • 1
    Can you provide a link to the site? Jul 13, 2014 at 14:12
  • @karpstrucking unfortunately not at this time. But if you have any questions, I can answer them to get you more info.
    – lordg
    Jul 13, 2014 at 14:15
  • 1
    I would say start stuffing it wit ob_get_status( true ) for starters... This looks pretty unique.
    – Rarst
    Jul 13, 2014 at 20:26
  • What's the content of your error logs? What pages is this happening on? Is it all admin pages or just on posts/page edit pages? What type of environment are you running? (apache, nginx)
    – Jeremy
    Sep 9, 2014 at 20:47
  • I don't see why we should help you if you do not provide us with specific information/code. Right now all that we know is that on certain backend pages your code breaks down. If you modified the wordpress core that is on you. If the problem relies in a plugin/theme you are developing check closely the code for errors and check the error_log file. Add ini_set('display_errors', '1') so that you can see the errors - if that does not work, modify php_ini to check them.
    – aifrim
    Sep 10, 2014 at 10:14

1 Answer 1

0

At this point we are doing basic debug...

I would start by disabling all plugins (or start with your custom plugins first). Navigate the backend and see if the issue occurs.

If it's all good, then enable each plugin 1 at a time and check the backend after each plugin is enabled.

If the issue occurs when all plugins are disabled, I would try a fresh install of WordPress.

If it still occurs with a vanilla WordPress then it's going to be a server config issue. Check all logs, including Apache and MySQL. Ensure permissions are correct (doubtful that's your issue as it's sporadic but never hurts.) and ensure all Apache/PHP extensions/modules are installed that's required for your setup.

Are you using a shared host or a dedicated server? Is it a cloud server? How is PHP running? (cgi, fastcgi, etc.) Are you using APC and/or memcached?

Use phpinfo and make sure everything is good, or at least matches your local dev.

Posting your phpinfo and httpd.conf would be helpful too. Also a list of plugins you are using.

Is this ONLY on the backend or is this happening on the frontend too?

If this is only backend, I would first assume a plugin or a corrupt WordPress install. I assume you have a (few) custom plugin(s). I would start by disabling them then going from there.

I see some encoding issues in your image. What are you setting the PHP/MySQL encoding to?

3
  • Thank you for your answer and suggestions. I've nailed it down to being a server issue. I did disabled WP plugins etc, but it still occurred and I then also noticed it occurring with a non-wordpress site on the same server. I took it up with the hosting company as it is a dedicated server. Error logs show nothing at all :(.
    – lordg
    Sep 17, 2014 at 18:42
  • non memcache or APC running either. As for the encoding, you're seeing the issue because I don't even get a full page returned, I get a portion of the page as if the server just spat it out as raw text. So the browser isn't aware of the encoding its being sent and is using its default.
    – lordg
    Sep 17, 2014 at 18:48
  • Hmmm... If you installed php-cgi prior to installing Apache, it doesn't set up Apache properly to run PHP, removing PHP entirely and reinstalling may fix your issue. Just a shot in the dark but I have heard of this happening in this case. Hopefully your host will be able to resolve it. Please update your question with the solution when it's fixed to help others that may have this in the future
    – Jeremy
    Sep 17, 2014 at 19:04

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.