I am installing phpfox script, after installation it is showing the following error,
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead - include/library/phpfox/setting/setting.class.php (321)
I have just got to the code and i am unable to change the syntax to preg_replace_callback
so i am writing the code below, kindly convert it for me thanks. 1
$aRow['value_actual'] = preg_replace("/s:(.*):\"(.*?)\";/ise", "'s:'.strlen('$2').':\"$2\";'", $aRow['value_actual']);
2
preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING']
3
preg_replace("/(.*?)\.(.*?)$/i", ".$2", $_SERVER['HTTP_HOST']
kindly convert 4th one as well.
4
preg_replace("/s:(.*):\"(.*?)\";/ise", "'s:'.strlen('$2').':\"$2\";'", (isset($aRow['user_group_id2']) && isset($aRow[$aRow['user_group_id']])) ? $aRow[$aRow['user_group_id']] : $aRow['value_actual']);
2 and 3 don't have the e modifier. Nothing to do. For 1 use:
If you want an explanation for any of them, please update your question. If you don't that's fine, too.
4
becomes: