coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: gerrut on May 27, 2004, 12:47:13 PM

Title: Notice: Undefined index: debug_mode
Post by: gerrut on May 27, 2004, 12:47:13 PM
Help please!

This weekend the time wasn't wright on my server. The next thing happend to my photo gallery.

Notice: Undefined index: debug_mode in /home/virtual/site6/fst/var/www/html/test/cpg1.2.1_standalone/include/functions.inc.php on line 96
Fatal error :
There was an error while processing a database query

I can't acces my admin or config or anything........
???
Title: Re: Notice: Undefined index: debug_mode
Post by: hyperion on May 27, 2004, 06:53:32 PM
Look at the code in include/config.inc.php and make sure the settings are correct.
Title: Re: Notice: Undefined index: debug_mode
Post by: gerrut on May 27, 2004, 07:13:52 PM
Line 96 says:         if (!$CONFIG['debug_mode']) {

So what do I need to do or change?

Title: Re: Notice: Undefined index: debug_mode
Post by: Casper on May 27, 2004, 07:25:34 PM
Look in your include/config.inc.php (it's on the server), and check that all the settings are correct.
Title: Re: Notice: Undefined index: debug_mode
Post by: gerrut on May 27, 2004, 07:51:04 PM
There is nothing wrong with the settings. So do I need to reset the database? And what is the next thing what happens if I do so? Is my gallery back at the begin....
Title: Re: Notice: Undefined index: debug_mode
Post by: hyperion on May 27, 2004, 09:40:48 PM
Database query errors usually means the settings are incorrect or have been altered without notice given to you.  Did you determine what caused the server time problem? Is it possible that the source of this problem could have corrupted a file?

Run the following experiment.  Try installing a new CPG 1.2.1 in the same database as this one, but be certain that you change the table prefix to something other that what you have in your current install.  Let us know if it installs and works correctly.
Title: Re: Notice: Undefined index: debug_mode
Post by: gerrut on May 28, 2004, 12:41:57 PM
The install works corectly. But when I want to log in the same error stays.....
Title: Re: Notice: Undefined index: debug_mode
Post by: sigepjedi on August 22, 2005, 07:31:28 PM
Im moving my site to a new host, media temple, and im getting this error.

----------------------------------------
Notice: Undefined index: debug_mode in /home/virtual/site394/fst/var/www/html/include/functions.inc.php on line 101
Fatal error :
There was an error while processing a database query
----------------------------------------

i have varified all my connection information is correct, but I am still getting this.
All of my files are correctly on their servers, and the DB is also fine in its new location.

Im wondering if this is something that they are maybe not allowing?

The piece of code that its referring to is:

// Perform a database query
function db_query($query, $link_id = 0)
{
global $CONFIG, $query_stats, $queries;

$query_start = cpgGetMicroTime();
if (($link_id)) {
$result = mysql_query($query, $link_id);
} else {
$result = mysql_query($query);
}
$query_end = cpgGetMicroTime();
if (isset($CONFIG['debug_mode']) && (($CONFIG['debug_mode']==1) || ($CONFIG['debug_mode']==2) )) {
$query_stats[] = $query_end - $query_start;
$queries[] = $query;
}
if (!$result) db_error("While executing query \"$query\" on $link_id");

return $result;
}

// Error message if a query failed
function db_error($the_error)
{
global $CONFIG;

if (!$CONFIG['debug_mode']) {
cpg_die(CRITICAL_ERROR, 'There was an error while processing a database query', __FILE__, __LINE__);
} else {

$the_error .= "\n\nmySQL error: ".mysql_error()."\n";

$out = "<br />There was an error while processing a database query.<br /><br/>
<form name='mysql'><textarea rows=\"8\" cols=\"60\">".htmlspecialchars($the_error)."</textarea></form>";

cpg_die(CRITICAL_ERROR, $out, __FILE__, __LINE__);
}
}




THANKS IN ADVANCE!!!!
Title: Re: Notice: Undefined index: debug_mode
Post by: Tranz on August 23, 2005, 03:38:50 AM
Just to confirm... did you update include/config.inc.php with the new mysql info?
Title: Re: Notice: Undefined index: debug_mode
Post by: sigepjedi on August 23, 2005, 04:11:01 PM
i just scrapped hte whole thing, and started over   :o