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: Database Name change  (Read 6860 times)

0 Members and 1 Guest are viewing this topic.

-TRshady-

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Database Name change
« 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
Logged

Nibbler

  • Guest
Re: Database Name change
« Reply #1 on: August 21, 2004, 03:11:45 am »

in include/config.inc.php
Logged

-TRshady-

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: Database Name change
« Reply #2 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? :(
Logged

-TRshady-

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 45
Re: Database Name change
« Reply #3 on: August 21, 2004, 04:30:22 am »

any ideas people? :(
Logged

Nibbler

  • Guest
Re: Database Name change
« Reply #4 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'.
Logged

skybax

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 180
    • SKYBAX Communications
Re: Database Name change
« Reply #5 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
Code: [Select]
// 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...
Logged
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.skybax.com%2FhotImage%2Fpost_footer.gif&hash=338b65c57a59f0b06311094e697c87794e43d945)
Don't contact me for support over PM or email unless I requested you to do so. Instead: post on the proper board.
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.