Exclusive eBooks, Software Solutions, Quality Guaranteed
 
Web NukeBiz
Welcome to NukeBiz · Members
Amazon
show cart or checkout0 items
Cart Value: 0.00

Forums » DragonflyCMS Projects » IP Tracker » [solved] IpTracker use of preg_match
[solved] IpTracker use of preg_match
Keeping tabs on visitors, bots and modules being used.
Topic initiation via Bugger.

Post new topic    Reply to topic    Printer Friendly Page     Forum Index »  Management » IP Tracker

View previous topic :: View next topic  
Author Message
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Mon Jun 02, 2014 7:41 pm
Post subject: [solved] IpTracker use of preg_match

Hola! Having finally moved everything to DF9.4 I thought I'd be able to upgrade and use IPTracker at 9.3.5. But still getting:

Fatal error: Call-time pass-by-reference has been removed in /home/waldron7/public_html/modules/IP_Tracker/admin/httpbl.php on line 35

Line in question:

preg_match('/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/', $ip, &$matches);

I'm using PHP 9.4.21

Thkx, rgds, mark

Initiated by Bugger (Original Entry) - Comments Here Please.


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Tue Jun 03, 2014 3:52 am
Post subject: Re: IpTracker use of preg_match

Yeah, sorry about that - noted and fixed some months back when I went to PHP 5.4.

Since someone else is now in that territory, I'll have to package up the changes and release the update.

There may been other issues and there were with a couple of other modules, so I'll have to track them down too.

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Wed Jun 04, 2014 10:48 am
Post subject: Re: IpTracker use of preg_match

Done nukebiz.com/Downloads/...ils/id=37/

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Wed Jun 04, 2014 8:26 pm
Post subject: Re: IpTracker use of preg_match

Thanks for very quick turnaround.

Confirming Admin issues are fixed.

I still see a few usernames not matching IP addresses - eg my IP on other users' names. So have Pruned the Db back to 0 records again after update, and will now monitor under 9.3.6

Will get back to you only if issue resurfaces.

Thanks again!


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Thu Jun 05, 2014 11:21 pm
Post subject: Re: IpTracker use of preg_match

Unfortunately I'm still seeing usernames incorrectly assigned. At least 5 users (incl me) and 6 IP addresses involved. At multiple times.

My hunch would be just the usernames are wrongly assigned, but hard to judge.

Happy to diagnose if you give me some pointers on where to start ...

Or reset things as you see fit ...

Or I can email you any required samples. (While I trust you with the IP addresses, I can't really post them here.)

TIA.


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Fri Jun 06, 2014 3:38 am
Post subject: Re: IpTracker use of preg_match

Can confirm, I think, that it is just the usernames that are incorrectly linked.

If I click on my IP address, even though it is displayed against 3 different usernames (including my own), it is always my own accesses that are listed. (Confirmed because I am the only one with access to IP-Tracker.)


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Fri Jun 06, 2014 5:57 am
Post subject: Re: IpTracker use of preg_match

hmm, I haven't encountered that before - I'll have to trace the code and see if there's a reason.

Maybe a silly question, but does it do that for the default theme?

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Fri Jun 06, 2014 3:01 pm
Post subject: Re: IpTracker use of preg_match

Phoenix wrote:
Maybe a silly question, but does it do that for the default theme?
Oooh, that'll be hard to test. (In the middle of a big membership drive - hence why I'm watching IP_Tracker so hard!)

I'm wondering if it could be due to having been running with problems (eg older ver with DF9.4, then PHP preg_match, etc) in the past. Ie. corruption.

I've pruned to 0 a couple of times, but is there a more complete "reset" I can do (eg. from phpmyadmin) to be sure any past corruption has been removed?


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Fri Jun 06, 2014 4:08 pm
Post subject: Re: IpTracker use of preg_match

I wouldn't have expected this issue to be occurring due to an older version, certainly not the code and I doubt the database.

The ultimate prune/purge would be to uninstall/install which would at least regenerate the db tables - the table field properties are certainly critical.

It's more likely to be associated with the page generation code rather than the data collection code which is relatively simple to check and appears okay.

Unless of course, you're actually seeing the issue directly in the db.

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Sat Jun 07, 2014 5:23 pm
Post subject: Re: IpTracker use of preg_match

Phoenix wrote:
Unless of course, you're actually seeing the issue directly in the db.

Happy to uninstall/install, but before I did that and potentially lost evidence, I tried looking at the Db.

First in IP_Tracker I did Host search on 1st 2 octets which listed my IP, with my nick on 626 hits, nothing/null (not logged in?) on 59, 4 on a user-only nick I use for testing, but also 11 other nicks (incl "Anonymous") which are not mine with between 1 and 4 hits each.

Those other nicks usually appear with their correct respective nicks, so the "error" is transitory in nature.

So in DB file _iptracking in phpmyadmin, I first sorted by ip_address, and then looked for layingback nick. Sure enough mixed in with the "layingback"s where Null, Anonymous, and each of the other - incorrect - nicks.

Does this rule out the theme, or could it still be a substituted .php somewhere. Using a refinement of my reDesign3+ but I've not added or removed any included .php or .inc files that I remember, so would expect it to be same as reDesign/redesigned - unless I've messed up, which is of course more than poss.

What should I look at/for next?

[ I thought it could be logged in as Admin and not User but I can see other users who are showing up with other IP's (in the wrong country). ]


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Mon Jun 09, 2014 7:08 am
Post subject: Re: IpTracker use of preg_match

Okay, let's confirm db structure - see below.

It is normal to see your nick, Anonymous or nothing associated with your IP.

I vaguely recall an issue that can happen with IPT associated with the DF user system but it was long ago - I think it was more related to IPs of 0.0.0.0 but thought that was resolved.

I've been through 300,000 listings in my IPT, sorted on IP ascending and can't find any irregularities.

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Mon Jun 09, 2014 3:15 pm
Post subject: Re: IpTracker use of preg_match

I think mine is functionally equivalent. See attachment.

I would imagine I got to 9.3.6 via 9.21, 9.2.2 then had to omit 9.3.5 as on outdated DF version.

Will try to PM you with excerpts of IPT display showing some of the cross-indexing. It is well more than just Anon and null on Admin.

Please advise if you would rather continue diagnosis, or restart with fresh install (which might mask a real issue, or not). I'm happy to proceed either way.


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Wed Jun 11, 2014 4:50 am
Post subject: Re: IpTracker use of preg_match

Many thanks for the data.

I think it's now best to do a fresh install because I simply can't see an issue in the code.

The iptracking.inc code that generates username:
PHP:
$ipuname = (is_user() || is_admin()) ? $userinfo['username'] : ((SEARCHBOT) ? SEARCHBOT : '');
It's simple code


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 77

PostPosted: Sun Jun 15, 2014 5:52 pm
Post subject: Re: IpTracker use of preg_match

Just to summarise for others reading this forum looking for solutions, the coding error was mine! :oops: And although the fix did show up a very minor issue with IPT, it was in a different area, not directly related to this problem.

Thanks to Phoenix for helping me focus on the correct issue.


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.1.73/5.4.21/9.4.0
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index »  Management » IP Tracker
Page 1 of 1
All times are GMT + 9.5 Hours



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum