Static function cache not cleared in PHP 5.3.28?

I am using SimplePie with PHP 5.2.17 to parse my RSS feeds through the WordPress feedwordpress plugin . This works well and no problem if I make sure to use this patch for simplepie (in IRI.php file).

However, if I change my PHP to use version 5.3.28, a memory leak (or some other memory leak) starts and my site crashes. Any idea what might be causing it / how to solve it?

(or, in other words, is there a reason this patch should work in 5.2 and not PHP 5.3?)

Thank.

+3


source to share


1 answer


PHP 5.3 is not fully backward compatible with PHP 5.2,

In your case, the usage clearstatcache()

is probably the cause of the memory leak.

As you can see in Migrating from PHP 5.2.x to PHP 5.3.x document:



clearstatcache () no longer clears the default real path cache.

This problem can be fixed explicitly by setting the parameter $clear_realpath_cache

totrue

clearstatcache(true)

      

+6


source







All Articles