zFeeder – Making PHP 5.3 + compatible, solving ‘Function ereg_replace() is deprecated’

You may want to check ZebreFeed – web-based RSS/ATOM aggregator on PHP5, based on zFeeder 1.6

The latest zFeeder 1.6 uses couple PHP functions – ereg_replace and set_magic_quotes_runtime, which are deprecated in PHP starting from version 5.3. These function will no more be supported from PHP 6.0 onward.

  1. How to solve “Deprecated: Function ereg_replace() is deprecated” problem?

    Use preg_replace, which uses perl regular experssion, instead of ereg_replace.
    There are two occurrences of ereg_replace (in subscriptions.php and zfuncs.php), and fortunately both takes same regex. Just replace:

    ereg_replace("[^[:alnum:]]"

    with

    preg_replace("#[^a-z\d]#i"

    preg_replace supposed to be much faster than ereg_replace.

  2. How to solve “Deprecated: Function set_magic_quotes_runtime() is deprecated” problem?

    Well, unfortunately I did not find any alternative function for set_magic_quotes_runtime. I did lot of googling but did not find any replacement for this function.

    All I can found, simply remove the occurrences of set_magic_quotes_runtime, it will STILL work for you. This is at least TRUE for zFeeder.

 

Recent Entries

2 Responses to “zFeeder – Making PHP 5.3 + compatible, solving ‘Function ereg_replace() is deprecated’”

  1. zFeeder – Making PHP 5.3 + compatible, solving 'Function … | Coder Online Says:

    [...] Read this article: zFeeder – Making PHP 5.3 + compatible, solving 'Function … [...]

  2. James O'Neill Says:

    Dear Gopu.

    Thank you for this great info. I recently upgraded my server to PHP5+ since this is a now a new requirement of wordpress. My Kriya yoga is now delayed one hour after discovering that z-feeder is not updating and has stopped working altogether- and now looking for a solution.

    So far I reinstalled everything so that I can check/reset permissions etc.

    But then I was happy to find this page, and very impressed.

    However I am still getting the following error :

    Warning: filemtime() [function.filemtime]: stat failed for /homepages/36/d2********/htdocs/newsfeeds/cache/http___www_anxietymadewell_com_rss_anxiety_rss.xml in /homepages/36/d2********/htdocs/newsfeeds/includes/zfuncs.php on line 202
    http://www.anxietymadewell.com/rss/anxiety.rss
    Updated:Thu, 01 Jan 1970 00:00:00 GMT

    I would appreciate if you have any ideas about this.

    Thanks,
    James

Leave a Reply