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........
???
Look at the code in include/config.inc.php and make sure the settings are correct.
Line 96 says: if (!$CONFIG['debug_mode']) {
So what do I need to do or change?
Look in your include/config.inc.php (it's on the server), and check that all the settings are correct.
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....
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.
The install works corectly. But when I want to log in the same error stays.....
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!!!!
Just to confirm... did you update include/config.inc.php with the new mysql info?
i just scrapped hte whole thing, and started over :o