Rockmongo Error: "Deprecated: preg_replace(): The /e modifier is deprecated"

If you're using a recent release of PHP and you see the following error message in the Web UI -


The full error reads - "Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /Library/WebServer/rockmongo/rock.php on line 449"


Edit line 449 in rock.php and change

$name = preg_replace("/_([a-zA-Z])/e", "strtoupper('\\1')", $name);

to read -

$name = preg_replace_callback("/_([a-zA-Z])/", function($m){return strtoupper($m[1]);}, $name);

Then restart apache.

Comments

Popular posts from this blog

An Ideal Boy

Automated Testing with vncdotool (Not Headless, but Hairless)

Install Guide for Pentaho BI Server 4.8 (Community Edition) with MySQL on Windows