coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: -TRshady- on August 21, 2004, 02:51:25 AM

Title: Database Name change
Post by: -TRshady- on August 21, 2004, 02:51:25 AM
http://www.trshady.com/gallery/ is my gallery.
Uploaded to a new server, made db back up and uploaded all files ... added it all and seems to have gone well but ..

Old hosting account had the username TRiley, now its TRshady which is reason behind the error im getting.
What I would like to ask is, where can I change the database name?

Thanks
Title: Re: Database Name change
Post by: Nibbler on August 21, 2004, 03:11:45 AM
in include/config.inc.php
Title: Re: Database Name change
Post by: -TRshady- on August 21, 2004, 03:36:30 AM
Thanks a lot for the reply, am now recieving the following error:


Notice: Undefined index: debug_mode in /home/trshady/public_html/gallery/include/functions.inc.php on line 96
Fatal error :
There was an error while processing a database query

Any ideas on what to do? :(
Title: Re: Database Name change
Post by: -TRshady- on August 21, 2004, 04:30:22 AM
any ideas people? :(
Title: Re: Database Name change
Post by: Nibbler on August 21, 2004, 04:34:23 AM
Enable debug mode and post the real error - posting 'There was an error while processing a database query' doesnt help anyone. If you cannot login, you will have to find cpg_config table and alter the 'debug_mode' field to '1'.
Title: Re: Database Name change
Post by: skybax on August 21, 2004, 04:54:36 AM
Coppermine appears to not be connecting to your database. Make sure that not only your username changed but mabe a prefix to the database name as well. I know some hosts place a prefix on the database name during the install. The code surrounding your error is that the query has failed.

lines 91-107

// 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__);
        }
}


try setting up a small script to connect to your database and make sure you can access it first...