Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles

Reply
 
Thread Tools
Turn on the debug mode
MrNase
Join Date: May 2003
Posts: 670

 

Germany
Show Printable Version Email this Page Subscription
MrNase MrNase is offline 06-09-2005, 10:00 PM

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
Reply With Quote
  #2  
Old 08-28-2005, 11:06 PM
GilbertZ GilbertZ is offline
 
Join Date: Nov 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 10-04-2005, 04:07 AM
ProperMethodz's Avatar
ProperMethodz ProperMethodz is offline
 
Join Date: Jan 2005
Location: Stamford CT
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 10-04-2005, 04:42 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 10-14-2005, 06:01 AM
TruckMuddr TruckMuddr is offline
 
Join Date: Sep 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'); 
Reply With Quote
  #6  
Old 12-15-2005, 02:28 AM
Daniel's Avatar
Daniel Daniel is offline
 
Join Date: Jul 2005
Location: USA
Posts: 707
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you.
Reply With Quote
  #7  
Old 12-15-2005, 04:06 AM
Code Monkey's Avatar
Code Monkey Code Monkey is offline
 
Join Date: May 2004
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't understand why it's not coded to only show the info to admins.
Reply With Quote
  #8  
Old 12-15-2005, 06:39 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 12-15-2005, 07:09 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 12-16-2005, 02:52 PM
Mudvayne's Avatar
Mudvayne Mudvayne is offline
 
Join Date: Dec 2005
Location: /dev/null/
Posts: 393
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04844 seconds
  • Memory Usage 2,292KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete