DragonflyCMS Projects > Audit (IP Tracker) > [solved] IpTracker use of preg_match > Community Forums > Phoenix Netology
Forum Index > Management > Audit (IP Tracker)

[solved] IpTracker use of preg_match Reply to topic


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.

Please enter your server specs in your user profile! 😢


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.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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!

Please enter your server specs in your user profile! 😢


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.

Please enter your server specs in your user profile! 😢


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.)

Please enter your server specs in your user profile! 😢


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?

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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?

Please enter your server specs in your user profile! 😢


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.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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). ]

Please enter your server specs in your user profile! 😢


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.
Attachment: ipt_table.png
Description
Filesize 28.38 KiB
Viewed 3 Time(s)
You are not allowed to view/download this attachment

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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.
Attachment: screenshot.png
Description
Filesize 53.57 KiB
Viewed 0 Time(s)
You are not allowed to view/download this attachment

Please enter your server specs in your user profile! 😢


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:$ipuname = (is_user() || is_admin()) ? $userinfo['username'] : ((SEARCHBOT) ? SEARCHBOT : '');It's simple code

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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.

Please enter your server specs in your user profile! 😢

All times are Australia/Adelaide


Jump to: