vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Debug info for specific userid? (https://vborg.vbsupport.ru/showthread.php?t=194081)

djxcee 10-20-2008 09:25 AM

Debug info for specific userid?
 
I know I can add
PHP Code:

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

in config.php but is there a way for me to make it viewable to specific userid? Just so I can see what's going on at all times ;).

Dismounted 10-20-2008 10:36 AM

No, there is no practical way. The debug variable needs to be set before the database class is initialised, but you can't get the user ID before the database connection is established ;).

Well, you can, but the explain feature won't work.

Lynne 10-20-2008 02:25 PM

I think you may be able to do it by IP, no?

PHP Code:

if ($_SERVER["REMOTE_ADDR"] == "xxx.xxx.xxx.xxx") {
    
// enable debug mode for only my IP address
    
$config['Misc']['debug'] = true;


(I've never tried this.)

djxcee 10-20-2008 05:45 PM

This looks like a great solution but unfortunately it's not working for me.

--------------- Added [DATE]1224530418[/DATE] at [TIME]1224530418[/TIME] ---------------

Very odd, it's working on one of my forum but not the other :confused:.

Thanks Lynne, will take a look around to see what's the problem.

Lynne 10-20-2008 06:28 PM

I just tested it on my 3.7.3 board and it works just fine. You did put your correct ip addy in there, right?

djxcee 10-20-2008 06:48 PM

Ah, the other forum wasn't working because of I accidently added the wrong IP...

Thank you, once again, Lynne :)

BTW, is it possible to add more then one ID address?

Lynne 10-20-2008 07:16 PM

Quote:

Originally Posted by djxcee (Post 1649134)
Ah, the other forum wasn't working because of I accidently added the wrong IP...

Thank you, once again, Lynne :)

BTW, is it possible to add more then one ID address?

I would guess you could just add an OR in there:
PHP Code:

if ($_SERVER["REMOTE_ADDR"] == "xxx.xxx.xxx.xxx" OR $_SERVER["REMOTE_ADDR"] == "yyy.yyy.yyy.yyy") {
    
// enable debug mode for only some IPs
    
$config['Misc']['debug'] = true;



Dismounted 10-21-2008 05:47 AM

PHP Code:

$debugips = array(
    
'xxx.xxx.xxx.xxx',
    
'yyy.yyy.yyy.yyy'
);

if (
in_array($_SERVER['REMOTE_ADDR'], $debugips))
{
    
$config['Misc']['debug'] = true;


Be aware that many people have dynamic IPs, meaning they change over time.

djxcee 10-21-2008 05:55 AM

I am aware of that and installed a FF extension to show my IP at all times so I will be ok.

Thanks much Lynne & Dismounted, I really do appreciate it :D.


All times are GMT. The time now is 09:29 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.01069 seconds
  • Memory Usage 1,741KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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