PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 
Site Navigation

Home:

 
Donate o Meter
Help Keep Our Servers Online AND Our Services Free!
Make donations with PayPal!
Donations
Anonymous May-24
Doulos May-15
Webservant May-11
AndyB May-5
Hotdog May-3
 
Please Link To Me!
 
Quality Web Hosting For All PHP Applications
Quality PHP Web Host!

Great Reviews!
Need help setting up your website, installing Apache, PHP, MySQL, or RavenNuke(tm)?
Need help customizing or designing scripts?
Please contact us via the Contact Us option for further details and pricing.

Link to Me

RavenPHPScripts

RavenPHPScripts

There are more Link To Me icons here.
 
Site Info v2.2.2 ©
Your IP: 38.107.179.232

 Welcome, Anonymous
Nickname
Password
Security Code:
Security Code
Type Security Code:

· Register
· Lost Password
Server Date/Time
24 May 2012 21:59:45 EDT (GMT -4)
 
How to disable DEBUG mode

26.7. How to disable DEBUG mode

You may have already come across those errors that enter automatically a DEBUG mode and output a more descriptive message of what happened (we saw how to do this ourselves in Section 3.9.23):

General Error
Couldn't update private forum permissions
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ' 1)' at line 2
INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (1, , 1)
Line : 425
File : /web/htdocs/www.yoursite.net/home/html69/modules/Forums/admin/admin_ug_auth.php

By the way, this is the error discussed in Section 3.9.14. You may not want to show so many details to your users and wish you could disable the DEBUG mode. But to disable the DEBUG mode, you have first to find where to do it:

In cases like this, search is your friend (see Can I disable the DEBUG mode): search for DEBUG in all texts of all files in all subdirectories of a PHP-Nuke installation. You will get a handful of lines:

/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, to disable DEBUG mode, you only need to edit includes/constants.php and change

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

to

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

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum