Wrong Database or No Database Wrong Database or No Database
 

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]

Main Menu

Wrong Database or No Database

Started by Syntax, October 13, 2004, 05:41:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Syntax

Ive included the script into a site design... and theres another script running on the same webpage.
The first script logs into the sql server and selects a db named accountr_database1, then
I have coppermine included which logs into the same sql server and uses a database named account_coppermine
coppermine then says

Critical Error
There was an error while processing a database query.
mySQL error: Table 'account_database1.cpg132_albums' doesn't exist

As you can see from the above debug mode it was trying to pull a table from _database1 instead of the _coppermine database.
So I added a mysql_close() to my first script.  Now coppermine says

Critical Error
There was an error while processing a database query.
mySQL error: No Database Selected

Whats the deal? It has its own database, and its set to select it in the config..
yet it tries to select the other one, that is already open, and if I close it, it dosnt even open its own..


Joachim Müller

coppermine usuallly can't be included via the php constructs "require" or "include". This is by design and can't be changed that easily.

Joachim

Syntax

Ive used it like this many times before.. just not this version...
and... Its not being included, the gallery is including my header footer and menu which include other scripts..
I ripped all the header and footer from the template
and then added include('/header.php'); and footer and menu inside
the theme.php under the sections where it generates the header and footer of the page.

works great.. just wrong database..

Nibbler

Add a mysql_select_db($CONFIG['dbname']) in there after the other scripts are finished,