Could not determine your IP address on Invision Power Board

If you encounter “Could not determine your IP address” error message after installing Invision Power Board on your localhost or shared hosting and you don’t know what to do, continue reading.

Open up a file called ipsRegistry.php at *IPB rootdirectory*/admin/sources/base/ipsRegistry.php. Search the error message and you will see the following code

//—————————————–
// Make sure we take a valid IP address
//—————————————–

if ( ( ! self::instance()->ip_address OR self::instance()->ip_address == ‘…’ ) AND ! isset( $_SERVER[‘SHELL’] ) AND $_SERVER[‘SESSIONNAME’] != ‘Console’ )
{
print “Could not determine your IP address”;
exit();
}

Now comment that code out and you will be able to access your new forums.

You might also get this same error when you try to update your IPB forum installation. You can use the same trick and comment out the same code at ipsRegistry_setup.php. The path for this is *IPB rootdirectory*/admin/setup/sources/base/ipsRegistry_setup.php

If this helps, please leave a comment so I know 🙂