How do I completely disable user IP logs?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
pangaea67
Registered User
Posts: 2
Joined: Sun Dec 24, 2017 9:29 pm

How do I completely disable user IP logs?

Post by pangaea67 » Sun Dec 24, 2017 9:39 pm

I am using PHPBB 3.2.1 and don't want to keep track of user IPs in any way whatsoever. Is there a setting to disable it or do I have to hack it out of the PHP code somewhere? I read online on that on a different version of PHPBB there is a get_ip function which you can just make return a static fake ip but I can't find it in my functions.php file.

User avatar
warmweer
Registered User
Posts: 1042
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: How do I completely disable user IP logs?

Post by warmweer » Mon Dec 25, 2017 12:40 am

pangaea67 wrote:
Sun Dec 24, 2017 9:39 pm
I am using PHPBB 3.2.1 and don't want to keep track of user IPs in any way whatsoever. Is there a setting to disable it or do I have to hack it out of the PHP code somewhere? I read online on that on a different version of PHPBB there is a get_ip function which you can just make return a static fake ip but I can't find it in my functions.php file.
There is no setting to disable IP logging. What you are asking is either an extension or some custom coding.
Search for instances of user_ip and set that to a static IP (127.0.0.1) but bear in mind
a) that unless you understand the code, don't touch it, and
b) that you shouldn't mess with the session_ips (which you wouldn't anyway if you understood the code).
A bug is a feature that hasn't made it to the manual (yet)

pangaea67
Registered User
Posts: 2
Joined: Sun Dec 24, 2017 9:29 pm

Re: How do I completely disable user IP logs?

Post by pangaea67 » Mon Dec 25, 2017 3:52 am

i
warmweer wrote:
Mon Dec 25, 2017 12:40 am
pangaea67 wrote:
Sun Dec 24, 2017 9:39 pm
I am using PHPBB 3.2.1 and don't want to keep track of user IPs in any way whatsoever. Is there a setting to disable it or do I have to hack it out of the PHP code somewhere? I read online on that on a different version of PHPBB there is a get_ip function which you can just make return a static fake ip but I can't find it in my functions.php file.
There is no setting to disable IP logging. What you are asking is either an extension or some custom coding.
Search for instances of user_ip and set that to a static IP (127.0.0.1) but bear in mind
a) that unless you understand the code, don't touch it, and
b) that you shouldn't mess with the session_ips (which you wouldn't anyway if you understood the code).
I have enough of an understanding of PHP, MySQL, and networking to be able to mod the code to do this I believe. I just need to find the chunk of code in this version of PHPBB that I need to modify. I don't mind IPs being stored temporarily in session variables and such, I just don't want any long-term logs.

User avatar
warmweer
Registered User
Posts: 1042
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: How do I completely disable user IP logs?

Post by warmweer » Mon Dec 25, 2017 9:04 am

pangaea67 wrote:
Mon Dec 25, 2017 3:52 am
I have enough of an understanding of PHP, MySQL, and networking to be able to mod the code to do this I believe. I just need to find the chunk of code in this version of PHPBB that I need to modify. I don't mind IPs being stored temporarily in session variables and such, I just don't want any long-term logs.
Your idea that a certain 'get_IP' function should be changed gives me the impression that you haven't studied the code sufficiently (sorry to put it so bluntly) to realise the implication that could have. It is not the function which has to be changed, but the value which is saved in "logs". Have a look in the database to see where IP's are used. The most simple way is probably just editing the field values in the database without touching the code, or, removing the log entries.


edited: I probably wasn't fully awake yet considering the garbled sentences I wrote.
Last edited by warmweer on Mon Dec 25, 2017 1:43 pm, edited 1 time in total.
A bug is a feature that hasn't made it to the manual (yet)

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2797
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: How do I completely disable user IP logs?

Post by thecoalman » Mon Dec 25, 2017 1:20 pm

You could run a cron task to update the tables every hour or whatever amount of time if that is not too long to store them. Prevent some work and maintenance issues with phpBB updates.

User avatar
3Di
Registered User
Posts: 12945
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: How do I completely disable user IP logs?

Post by 3Di » Mon Dec 25, 2017 6:40 pm

Comic enough since I wrote the extension which disables the Cloudflare's IP nodes but..
you may install Cloudflare and all of the IPS will be assigned && therefore stored to its nodes, say fake IPS.

And yes, a cron job which does a DB pruning is a good idea indeed,
that cron job is not available in a standard installation, though. Should be requested.

I would forget about hard-coding the core, in fact, I am not suggesting the way for it. Sorry.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2797
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: How do I completely disable user IP logs?

Post by thecoalman » Tue Dec 26, 2017 12:21 am

3Di wrote:
Mon Dec 25, 2017 6:40 pm
And yes, a cron job which does a DB pruning is a good idea indeed,
that cron job is not available in a standard installation, though. Should be requested.
I was referring setting one up on the server. just set the IP to 0.0.0.0 or whatever.

User avatar
3Di
Registered User
Posts: 12945
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: How do I completely disable user IP logs?

Post by 3Di » Tue Dec 26, 2017 12:31 am

thecoalman wrote:
Tue Dec 26, 2017 12:21 am
3Di wrote:
Mon Dec 25, 2017 6:40 pm
And yes, a cron job which does a DB pruning is a good idea indeed,
that cron job is not available in a standard installation, though. Should be requested.
I was referring setting one up on the server. just set the IP to 0.0.0.0 or whatever.
It doesn't matter if on the server or within phpBB itself (which is preferred in this case), a cron job has to be coded to instruct itself which tables/data have to be "pruned" (read IPs replaced by a fake one).. this code (aka cron job) has to be created therefore requested. AKA an extension. Or a script to call via server's cron jobs.

IP on registration and poster_ip, logs etc..
there are different places where the IP is stored, in a different way too.

It is also possible to modify my extension in order to use a fake IP (aka 127.0.0.1) without using Cloudflare as per my above suggestion. The real stuff, primary, is to sanitize old data though.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49556
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How do I completely disable user IP logs?

Post by stevemaury » Tue Dec 26, 2017 3:29 pm

My question is "why"? The IPs are still in the access logs and only you can see the ones stored in the phpBB database.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: david63, enter a valid email, Exabot [Bot], freelancingskill, invenio, KevC, Mick, Midev, Mixlight, static1635 and 103 guests