I am having a database connection error on wordpress.
After a post, the site spins for a long time and gives one liner database connection issue. Sometimes, the site shows wordpress error page "Error establishing a database connection" and wants me to check wp-config.php and states cant contact the database server.
When I check the log. I see...
[error] PHP Fatal error: Call to undefined function wp_cache_get() in /srv/www/example.com/public_html/wp-includes/functions.php on line 346
I checked on line 346
Code:
$notoptions = wp_cache_get( 'notoptions', 'options' );
from line 344 to 350
Code:
if ( ! defined( 'WP_INSTALLING' ) ) {
// prevent non-existent options from triggering multiple queries
$notoptions = wp_cache_get( 'notoptions', 'options' );
if ( isset( $notoptions[$option] ) )
return $default;
$alloptions = wp_load_alloptions();
I have
mysql 5.1.41
wordpress 3.2.1
apache
for cache I have w3tc
???
I am on lamp set up.
thank you.