phpBB 3: How to Disable IP Logging

by 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…


  1. Open includes/session.php

  2. Search
    $this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
  3. Replace with:
    $this->ip = '';

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='';
UPDATE phpbb_log SET log_ip='';
UPDATE phpbb_poll_votes SET vote_user_ip='';
UPDATE phpbb_posts SET poster_ip='';
UPDATE phpbb_privmsgs SET author_ip='';
UPDATE phpbb_sessions SET session_ip='';

If you have phpBB installed with Installatron it could be that your tables start with “bb_” and not with “phpbb_”

Incoming search terms:

:, , , , ,

4 Comments for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!