Memory issues – Fatal error: out of memory – plugins?

To diagnose a load-intensive (either CPU cycles or memory) Plugin, start by deactivating all Plugins. Ensure that, with no Plugins active, you do not observe the same issues. If you observe the same issues with all Plugins deactivated, then the problem is somewhere else, either with your Theme, your database, or your server configuration. If … Read more

current_user_can on WordPress 3.1.1

You are calling the function too early. The functions.php is included before current_user_can() is defined. Never do anything before the hook ‘after_setup_theme’: Example for the functions.php add_action( ‘after_setup_theme’, array( ‘WPSE_14041_Base’, ‘setup’ ) ); class WPSE_14041_Base { public static function setup() { ! isset ( $GLOBALS[‘content_width’] ) and $GLOBALS[‘content_width’] = 480; add_theme_support( ‘post-thumbnails’, array( ‘post’, ‘page’ … Read more

PHP Fatal error: Cannot call overloaded function for non-object in wp-includes/capabilities.php [closed]

This issue usually stems from PHP configuration issues, APC caching, and/or a call to an incompatible XML library. From what I’ve seen, it is usually a combination of php 5.2.X and caching. If you’re using caching on your site, try switching from APC/memcached cache to disk caching and see if it clears up. 9/10 times, … Read more