Notice: Undefined index: debug_mode Notice: Undefined index: debug_mode
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Notice: Undefined index: debug_mode

Started by gerrut, May 27, 2004, 12:47:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gerrut

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........
???

hyperion

Look at the code in include/config.inc.php and make sure the settings are correct.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

gerrut

Line 96 says:         if (!$CONFIG['debug_mode']) {

So what do I need to do or change?


Casper

Look in your include/config.inc.php (it's on the server), and check that all the settings are correct.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

gerrut

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....

hyperion

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.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

gerrut

The install works corectly. But when I want to log in the same error stays.....

sigepjedi

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!!!!

Tranz

Just to confirm... did you update include/config.inc.php with the new mysql info?

sigepjedi

i just scrapped hte whole thing, and started over   :o