Title: PHP 5.2 Fatal Error in cache.php
Last modified: August 18, 2016

---

# PHP 5.2 Fatal Error in cache.php

 *  [pulponair](https://wordpress.org/support/users/pulponair/)
 * (@pulponair)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/)
 * Hi there,
    after upgrading to PHP 5.2 i recieve “PHP Fatal error: Call to a member
   function get() on a non-object in /var/www/xxx/htdocs/wp-includes/cache.php on
   line 29” This seems to be related to some changes made in php5.2 regarding object
   handling. See [http://www.php.net/UPDATE_5_2.txt](http://www.php.net/UPDATE_5_2.txt)
   and [http://www.php.net/ChangeLog-5.php#5.2.0](http://www.php.net/ChangeLog-5.php#5.2.0)
 * Any ideas how to workaround this? Disabling the cache does not work at all.
    
   Cheers, nikolas

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476407)
 * According to a user in another forum you can re-upload the /wp-includes files
   and it cures it.
    ???
 *  Thread Starter [pulponair](https://wordpress.org/support/users/pulponair/)
 * (@pulponair)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476410)
 * No, why should that cure this issue?
 *  Thread Starter [pulponair](https://wordpress.org/support/users/pulponair/)
 * (@pulponair)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476425)
 * Any ideas? on that? anyone out there running wordpress using php 5.2? any other
   websites i could search?
 *  Thread Starter [pulponair](https://wordpress.org/support/users/pulponair/)
 * (@pulponair)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476723)
 * got it:
    [http://trac.wordpress.org/ticket/3354](http://trac.wordpress.org/ticket/3354)
 *  [blork](https://wordpress.org/support/users/blork/)
 * (@blork)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476753)
 * I get the same PHP error, but the fix above didn’t help at all, as I’m not good
   with PHP or MySQL.
 * `For example, it said:
    Temporary fix : wp-includes/cache.php Line 28: if (!is_object(
   $wp_object_cache)) { $wp_object_cache = new WP_Object_Cache(); } wp-includes/
   cache.php Line 187: if (!is_object($wpdb)) { $wpdb = new wpdb(DB_USER, DB_PASSWORD,
   DB_NAME, DB_HOST); }
 * But it doesn’t specify if that code is supposed to REPLACE something that’s already
   there, or if it’s supposed to be additional to what’s there. I guessed “additional”(
   given that there was nothing in lines 28 or 187). I re-uploaded the cache.php
   file, and then the blog would not load at all.
 * I’m also tracking this problem over here:
 * [http://wordpress.org/support/topic/96746](http://wordpress.org/support/topic/96746)
 *  [inspired2write](https://wordpress.org/support/users/inspired2write/)
 * (@inspired2write)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476754)
 * Good thread to start. I’ve pondered the idea of upgrading my site to php 5.2 
   but was concerned if it would goof something up.
 * I wonder if it would make any difference to disable the cache setting in the 
   WordPress dashboard before doing the upgrade? I don’t know much about php upgrading,
   but it was just a thought that came to mind.
 *  [blork](https://wordpress.org/support/users/blork/)
 * (@blork)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476755)
 * Where do you disable the cache? I looked all over and didn’t see anything like
   that.
 * And if I disable the cache, will that just break something else? (I assume the
   cache is there for a reason…)
 *  [blork](https://wordpress.org/support/users/blork/)
 * (@blork)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476756)
 * Whoa! The problem has been SOLVED!
 * It was nothing I did — apparently there IS A PROBLEM WITH WORDPRESS and PHP 5.2!
   This problem appeared when they upgraded me to PHP 5.2 earlier in the week (I
   only made the connection a few minutes ago). So my host downgraded me to PHP 
   4 and now the blog works just fine.
 *  [inspired2write](https://wordpress.org/support/users/inspired2write/)
 * (@inspired2write)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476757)
 * Hi blork,
    Glad to hear your problem is resolved. In regards to disabling the
   cache if you need to, it is here:
 * Dashboard > Options > WP-Cache
 * Then you can select to either disable or enable the cache. Sometimes when I’ve
   done changes to my template the only way I could get the change to show up right
   away was to disable the cache and then later go back in and re-activate it. No
   harm done by doing so, at least from my understanding. I don’t know if maybe 
   the newest version of WordPress eliminated that challenge or not. I haven’t tested
   it since upgrading.
 * I don’t know if that would have helped or not in regards to upgrading to PHP 
   5.2 but I think I will hold off on upgrading mine for now until more people report
   having success with it.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘PHP 5.2 Fatal Error in cache.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 4 participants
 * Last reply from: [inspired2write](https://wordpress.org/support/users/inspired2write/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/php-52-fatal-error-in-cachephp/#post-476757)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
