Skip to content

Instantly share code, notes, and snippets.



Last active Nov 3, 2018
What would you like to do?
How to Enable Debug Mode in XenForo Only for Admins
//* Do NOT include the opening php tag above. Copy the code shown below.
// Add here your ip.
$debug_ips = array('');
//For multiple IPs Use this
//$debug_ips = array('','SOME.OTHER.IP');
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip_address = $_SERVER['REMOTE_ADDR'];
if(in_array($ip_address, $debug_ips))
$config['debug'] = true;

This comment has been minimized.

Copy link

@4maroc 4maroc commented Mar 10, 2018

Sorry but Not working
i use xenforo 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment