CMS MADE SIMPLE FORGE

Statistics

 

[#6232] eregi deprecated notice

avatar
Created By: Noel McGran (nullig)
Date Submitted: Tue Mar 08 16:18:17 -0500 2011

Assigned To:
Version: 1.1.3
CMSMS Version: None
Severity: Major
Resolution: None
State: Open
Summary:
eregi deprecated notice
Detailed Description:
I get the following notice in the Statistics module

Deprecated: Function eregi() is deprecated in
/path/to/modules/Statistics/action.defaultadmin.php on line 28

Unfortunately, the host for this site does not allow access to php.ini and
changes to php settings made through php or htaccess don't work.


History

Comments
avatar
Date: 2013-01-16 03:48
Posted By: Rainmachine (rainmachine)

I managed to fix this by changing line 28 in action.defaultadmin.php

change 
if (($adminips=="") || (eregi($_SERVER["REMOTE_ADDR"],$adminips)===false)) {

to:
if (($adminips=="") ||
(preg_match("/".$_SERVER["REMOTE_ADDR"]."/i",$adminips)===false)) {


you will have to reset the Statistics module in order to clear the faulty mysql
entries.