I’m using SimplePie with PHP 5.2.17 to parse my RSS feeds through the WordPress plugin feedwordpress. This works well and without problems if I make sure to use this patch to simplepie (in the file IRI.php).
However, if I change my PHP to use version 5.3.28 – the 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 in PHP 5.3?)
Thanks.
PHP 5.3 isn’t fully backward compatible with PHP 5.2,
In your case, the use of the
clearstatcache()
is probably the cause of the memory leak.As you can see in the Migrating from PHP 5.2.x to PHP 5.3.x document:
This issue can be fixed by explicitly setting the
$clear_realpath_cache
parameter totrue