Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
How to disable the DEBUG mode in PHP-Nuke



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
Truden
Major
Major


Joined: 23 Jul 2003
Posts: 280
Location: Johannesburg

PostPosted: Thu Dec 11, 2003 5:49 pm    Post subject: How to disable the DEBUG mode in PHP-Nuke
Reply with quote

Can I hide the DEBUGE mode in PHP Nuke?
And can I do it for ALL except for the ADMIN loged user?

Thank You Very Happy

Did I remind you soon that I Love you guys? Very Happy
OK. Now I did it Wink

Love
Truden
_________________
Thank you for being with you!
Back to top
View user's profile Send private message Visit poster's website
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Fri Dec 12, 2003 12:37 am    Post subject:
Reply with quote

"Give a man a fish and you feed him for a day. Teach a man to fish, and you feed him for a lifetime." (Confucius)

I will not only tell you the solution, but also how I arrived at it. Smile

I searched for DEBUG in all texts of all files in all subdirectories of a PHP-Nuke installation and I found only a handful of lines:

Code:

grepdir DEBUG ./
grepdir: running /usr/bin/find ./ -type f -print0 | /usr/bin/xargs -0 /usr/bin/grep DEBUG
./includes/constants.php://define('DEBUG', 1); // Debugging on
./includes/constants.php:define('DEBUG', 1); // Debugging off
./includes/functions.php:       if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) )
./includes/functions.php:       // Add on DEBUG info if we've enabled debug mode and this is an error. This
./includes/functions.php:       // prevents debug info being output for general messages should DEBUG be
./includes/functions.php:       if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) )
./includes/functions.php:                       $msg_text = $msg_text . '<br /><br /><b><u>DEBUG MODE</u></b>' . $debug_text;
./modules/WebMail/pop3.php:        var $DEBUG=0;
./modules/WebMail/pop3.php:                if ($this->DEBUG) echo "<b>Sending Command: </b>".$command."<br>";flush();
./modules/WebMail/pop3.php:                        if ($this->DEBUG) echo "<b>Result OK: </b><br>";flush();
./modules/WebMail/pop3.php:                 if ($this->DEBUG) echo "<b>Openning Connection to: </b>".$this->hostname."<br>";flush();
./modules/WebMail/pop3.php:                if ($this->DEBUG) echo "<b>Connection opened </b><br>";flush();
 


It is clear that the DEBUG constant is set in includes/constants.php (see the first two lines of the above results) and is used in the rest of the files.

Thus you only need to edit includes/constants.php and change

Code:

// Debug Level
define('DEBUG', 1); // Debugging on
//define('DEBUG', 1); // Debugging off


to

Code:

// Debug Level
//define('DEBUG', 1); // Debugging on
define('DEBUG', 1); // Debugging off


Thanks for your love! Smile
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Truden
Major
Major


Joined: 23 Jul 2003
Posts: 280
Location: Johannesburg

PostPosted: Fri Dec 12, 2003 10:41 am    Post subject:
Reply with quote

Now everibody can see...
If you give Love, you receive Love and something more on top of it... Very Happy

So..., my Friends: Love everybody, and everybody will give you Love and something more in addition.
It looks egoistic, but it is just the way of Love Wink

Thank You, Chris Smile

Love to All
Truden
_________________
Thank you for being with you!
Back to top
View user's profile Send private message Visit poster's website
anor
Private
Private


Joined: 20 Dec 2003
Posts: 2

PostPosted: Sat Dec 20, 2003 7:10 pm    Post subject:
Reply with quote

Actually this isn't right since you only commented out one line (and replaced it with a exact similair line. Thefor too turn debug (forum debug only) Your have too change:


Code:
// Debug Level
//define('DEBUG', 1); // Debugging on
define('DEBUG', 1); // Debugging off


Too

Code:
// Debug Level
//define('DEBUG', 1); // Debugging on
define('DEBUG', 0); // Debugging off


You will see that i replace 1 (on) with 0 (off). Now when an FORUM error occurs you will NOT see what has caused it.

Now if you want too turn debug ON for phpnuke open includes/sql_layer.php and search for:
Code:
global $sql_debug, $query_count_old; // on ajoute la variable $query_count_old
$sql_debug = 0;


Now too enable debug for phpnuke (NOT THE FORUM) change
Code:
$sql_debug = 0;
too
Code:
$sql_debug = 1;
.

One advice for the phpnuke debug, just make use of it when you are having an error because it will show the many sql queries that phpnuke makes on your site.

Well hopefully this is information somebody can use.

Oh and excellent work on that accelerate phpnuke Wink Works like a dream Smile
Back to top
View user's profile Send private message Visit poster's website
Truden
Major
Major


Joined: 23 Jul 2003
Posts: 280
Location: Johannesburg

PostPosted: Sat Dec 20, 2003 8:39 pm    Post subject:
Reply with quote

Thank You, anor

I came to comlane that it does not work for me Smile
I also figur out that to comment and uncomment the same text is useles, and did try to do it for both of them.
Didn't work Sad

I didn't think of changeing the "1"

The thing is that I don't want to show any sql queries, which can be used for not "frendly purposes"

One of the ways to harden your security is to change some of the file names, and var's.
It is not difficulte if you know what are you doing.

Well, I'm not the one that could say "I KNOW", but have already done some tests.
It works.

Cheers Smile

How is going, Chris Smile
Keep well.

Love to All

Truden
_________________
Thank you for being with you!
Back to top
View user's profile Send private message Visit poster's website
anor
Private
Private


Joined: 20 Dec 2003
Posts: 2

PostPosted: Sat Dec 20, 2003 8:56 pm    Post subject:
Reply with quote

NP glad too be happy too share this since this is a much asked thing Smile
Back to top
View user's profile Send private message Visit poster's website
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Sat Dec 20, 2003 11:16 pm    Post subject:
Reply with quote

Hi anor, Truden and kind readers worldwide, Very Happy

true, both lines were the same... Shocked

Thanks about that! Believe it or not, the code is so in the standard constants.php file that comes with PHP-Nuke 6.8! With the comments saying "Debugging on" and "Debugging off", but the code being identical!

Of course, I should have checked... Wink
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Klear
Private
Private


Joined: 01 Sep 2011
Posts: 1

PostPosted: Thu Sep 01, 2011 9:19 am    Post subject:
Reply with quote

Oh and excellent work on that accelerate phpnuke Wink Works like a dream:)
Back to top
View user's profile Send private message
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 1
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group