Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Notice: Undefined index: debug_mode  (Read 9656 times)

0 Members and 1 Guest are viewing this topic.

gerrut

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Notice: Undefined index: debug_mode
« 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........
 ???
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Notice: Undefined index: debug_mode
« Reply #1 on: May 27, 2004, 06:53:32 pm »

Look at the code in include/config.inc.php and make sure the settings are correct.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

gerrut

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Notice: Undefined index: debug_mode
« Reply #2 on: May 27, 2004, 07:13:52 pm »

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

So what do I need to do or change?

Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Notice: Undefined index: debug_mode
« Reply #3 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.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Notice: Undefined index: debug_mode
« Reply #4 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....
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Notice: Undefined index: debug_mode
« Reply #5 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.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

gerrut

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Notice: Undefined index: debug_mode
« Reply #6 on: May 28, 2004, 12:41:57 pm »

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

sigepjedi

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Notice: Undefined index: debug_mode
« Reply #7 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!!!!
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Notice: Undefined index: debug_mode
« Reply #8 on: August 23, 2005, 03:38:50 am »

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

sigepjedi

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Notice: Undefined index: debug_mode
« Reply #9 on: August 23, 2005, 04:11:01 pm »

i just scrapped hte whole thing, and started over   :o
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 18 queries.