phpBB 3: How to Disable IP Logging
by admin on Feb.16, 2012, under Web Development
phpBB is an popular open-source bulletin board software written in PHP. It logs IP’s automatically and stores them in the database. It’s very important for security purposes, but if you have concerns about data privacy you can disable IP logging permanently. Please note that your apache is logging IPs also…
- Open includes/session.php
- Search
$this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
- Replace with:
$this->ip = '127.0.0.1';
Now IP logging is disabled from now on… You probably have to apply this hack everytime after you updated the phpBB software.
If you want to clear all logged IP’s establish a connection to your MySQL database e.g. with phpMyAdmin and execute the following commands:
UPDATE phpbb_users SET user_ip='127.0.0.1'; UPDATE phpbb_log SET log_ip='127.0.0.1'; UPDATE phpbb_poll_votes SET vote_user_ip='127.0.0.1'; UPDATE phpbb_posts SET poster_ip='127.0.0.1'; UPDATE phpbb_privmsgs SET author_ip='127.0.0.1'; UPDATE phpbb_sessions SET session_ip='127.0.0.1'; |
If you have phpBB installed with Installatron it could be that your tables start with “bb_” and not with “phpbb_”…
April 28th, 2012 on 2:15 pm
Thanks for this.