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.
-
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.
-
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
- It’s time to start farming….
- zFeeder – Making PHP 5.3 + compatible, solving ‘Function ereg_replace() is deprecated’
- How to multilingualize or localize URL in Gallery2 – enhancement of multilang module to create multilingual URLs, Multi-language URL for SEO with Multi Language Module
- Fix for mergelog, fails with error “abort due to a problem” for dummy records of apache access logs
- Shepherds life in mountain
- The modern marriage culture among mate
- Do you know that barter system still exists in most villages in uttarakhand, may be true for many other parts of India also
- How to catch copy paste from explorer using shell extension? ICopyHook alternative for files and folder
- How to convert ASCII/UNICODE string to hex string? Function/API to convert to hex string
- How to solve ‘ReadFile hangs’ for named pipe client/server – sample working code for named pipe
January 14th, 2010 at 2:39 pm
[...] Read this article: zFeeder – Making PHP 5.3 + compatible, solving 'Function … [...]