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

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

One Response 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 … [...]

Leave a Reply