vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Turn on the debug mode (https://vborg.vbsupport.ru/showthread.php?t=82835)

MrNase 06-09-2005 10:00 PM

Turn on the debug mode
 
You can turn on the debug mode simple by adding:

PHP Code:

$config['Misc']['debug'] = true

to your includes/config.php just before
Code:

/*======================================================================*\
|| ####################################################################

(which is at the end of the file ;))


To turn it off you may remove that line or change it to:
PHP Code:

 $config['Misc']['debug'] = false


GilbertZ 08-28-2005 11:06 PM

As a vb dev told me when I brought up the security implications of turning debug on: "You shouldn't be using debug mode on a live site. Use it on a private test installation that is controlled by .htaccess permissions."

Keep that in mind and if you plan to use debug on a live board for just a few minutes, make sure to turn it back off when you're done.

ProperMethodz 10-04-2005 04:07 AM

Quote:

Originally Posted by GilbertZ
As a vb dev told me when I brought up the security implications of turning debug on: "You shouldn't be using debug mode on a live site. Use it on a private test installation that is controlled by .htaccess permissions."

Keep that in mind and if you plan to use debug on a live board for just a few minutes, make sure to turn it back off when you're done.

What are the possible security issues with this.

I mean the speed limit sign says 55 but I don't do 55... I go a little over. Sometimes I don't wear my seatbelt.

Tell me why I should go 55 and wear the seatbelt. :)

Then when you're done with that... tell me the reasons that debug mode creates a security issue... kthx :)

Colin F 10-04-2005 04:42 AM

Quote:

Originally Posted by ProperMethodz
What are the possible security issues with this.

I mean the speed limit sign says 55 but I don't do 55... I go a little over. Sometimes I don't wear my seatbelt.

Tell me why I should go 55 and wear the seatbelt. :)

Then when you're done with that... tell me the reasons that debug mode creates a security issue... kthx :)

From what I understand, as anyone can see what your board is doing (query explain for example), it would be much easier to find security holes in your code.

TruckMuddr 10-14-2005 06:01 AM

If your IP doesn't change and your the only one needing to use the debug mode, you can do this.

PHP Code:

 $config['Misc']['debug'] = ($_SERVER['REMOTE_ADDR'] == 'xxx.xxx.xxx.xxx'); 


Daniel 12-15-2005 02:28 AM

Thank you.

Code Monkey 12-15-2005 04:06 AM

I don't understand why it's not coded to only show the info to admins.

Hellcat 12-15-2005 06:39 AM

Quote:

Originally Posted by JumpD
I don't understand why it's not coded to only show the info to admins.

Maybe you want to test some things without beeing logged in as admin, or beeing logged in at all.

As I understand this, it's was never meant to be used on a "live" system anyway.

Paul M 12-15-2005 07:09 AM

Actually, I have debug mode permanantly enabled in my config file - I then have a couple of plugins that disable it in the ACP and main forum, so if I need to turn it on I just disable the relevant plugin.

Mudvayne 12-16-2005 02:52 PM

Quote:

Originally Posted by TruckMuddr
If your IP doesn't change and your the only one needing to use the debug mode, you can do this.

PHP Code:

 $config['Misc']['debug'] = ($_SERVER['REMOTE_ADDR'] == 'xxx.xxx.xxx.xxx'); 


any idea to use userid instead of ip address?

EricaJoy 01-01-2006 04:33 PM

Quote:

Originally Posted by Paul M
Actually, I have debug mode permanantly enabled in my config file - I then have a couple of plugins that disable it in the ACP and main forum, so if I need to turn it on I just disable the relevant plugin.

care to release that little goodie?

Logikos 02-07-2006 05:55 PM

People who want to do this without editing files. See This Plugin.

Delphiprogrammi 02-07-2006 09:20 PM

Quote:

Originally Posted by LiveWire
People who want to do this without editing files. See This Plugin.

ey that's a nice one !!!! cheers

Carnage 03-18-2006 07:40 PM

hmm, i hacked one board i was admin on to auto set debug mode on in the template editor cause it was the only way you could edit the Master style. (useful when adding new templates so you dont have to add them to EVERY SINGAL skin :p)

Antivirus 09-26-2006 02:37 PM

What if I want to enable debug mode for two different ips?

Delphiprogrammi 09-26-2006 04:47 PM

Quote:

Originally Posted by Antivirus
What if I want to enable debug mode for two different ips?

PHP Code:

$ips = array('127.0.0.1');
$config['Misc']['debug'] = (in_array($_SERVER['REMOTE_ADDR'], $ips) ? true false); 

that should do it offcource replace 127.0.0.1 with your ip's

Adrian Schneider 09-26-2006 05:34 PM

Just a side-note:

The in_array(...) ? true : false is redundant, because it returns true/false anyway. :)

Antivirus 10-24-2006 04:01 PM

Quote:

Originally Posted by SirAdrian
Just a side-note:
The in_array(...) ? true : false is redundant, because it returns true/false anyway. :)

I think you're correct sirAdrian, Delphiprogrammi's code doesn't seem to work for me.

Surviver 10-30-2006 11:35 AM

Hello, I've coded a small Plugin to activate the Debug Mode via the ACP: https://vborg.vbsupport.ru/showthread.php?t=130212

Surviver

Antivirus 12-08-2006 11:12 PM

what's the conditional to determine whether or not debug mode is turned on?

For instance, i only want a print_label_row to show within my admincp if debug mode is turned on.

Surviver 01-05-2007 07:10 PM

I think you mean
PHP Code:

if($vbulletin->debug

;)

Greetings Surviver

BigJimTheLug 01-07-2007 02:36 AM

What is debug for?

Does it repair the forum by itself if something is not acting correctly?

If so, how can I enact it?

troybtj 07-11-2007 11:22 PM

(regarding plugin product above by Surviver)
Installed in 3.6.7, but it won't show me the queries when I click "Explain" as it does when I put my IP addy in config.php. Tried both using IP and userid modes. Rest of it (forum/ACP) work perfect!
(/regarding plugin product above by Surviver)

What is the method used to cache templates? I have many red ones, and saw that mentioned here. I'm a newb, and I tried RTFM, but the FM doesn't really include much for devel info.

Where is a link to a bit more extensive info on vB Structures (if condition, bbuserinfo, etc?)

flynnibus 01-29-2008 01:15 AM

Cleaned up array IP example

Code:

$debug_ips = array('10.10.10.10','10.1.1.1', '10.2.2.2');
$config['Misc']['debug'] = (in_array($_SERVER['REMOTE_ADDR'], $debug_ips));

Replace 10.x.x.x IPs above with the IPs you want to use of course.

1Unreal 07-07-2009 05:26 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=165623" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=165623</a>

James Birkett 10-01-2009 07:52 PM

Quote:

Originally Posted by Paul M (Post 849070)
Actually, I have debug mode permanantly enabled in my config file - I then have a couple of plugins that disable it in the ACP and main forum, so if I need to turn it on I just disable the relevant plugin.

(bumps an old article)
Care to share the plugin? :rolleyes:

I'm forever commenting the line out and uncommenting it.

MoMan 08-29-2010 01:59 AM

That debug mode plugin linked above is simply fantastic. More importantly, why didn't I know that vbulletin options could be added in-browser rather than through XML before I started writing my own plugins? :p


All times are GMT. The time now is 02:37 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01301 seconds
  • Memory Usage 1,786KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete