database connection error
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 wpcacheget() in /srv/www/example.com/public_html/wp-includes/functions.php on line 346
I checked on line 346````
$notoptions = wpcacheget( 'notoptions', 'options' );
from line 344 to 350````
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.
4 Replies
these links should help anyone that has the same issue
@awordpresslife:
The second link is broken
http://library.linode.com/lamp-guides/u … 0.04-lucid">http://library.linode.com/lamp-guides/ubuntu-10.04-lucid
This is most likely because 10.04 isn't supported at all by Canonical at this point. If you're using Ubuntu 10.04 I'd really recommend upgrading to a more recent version of Ubuntu to avoid running into complications.
If you're actually running a more recent version, these guides should be applicable:
If you're not running Ubuntu at all, we have guides for CentOS 6/7, Debian 7/8 and Arch Linux as well:
Hope this helps!