Custom Header Problem Custom Header Problem
 

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

Custom Header Problem

Started by fareforce, August 20, 2006, 05:43:25 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

fareforce

Coppermine Version: 1.4.8
Website: http://www.alaskastudio.com
Coppermine Installation: http://www.alaskastudio.com/gallery
Coppermine is bridged with SFM


Okay now that I have that out of the way I am trying to include a php file (leftnav.php) for a left menu through the admin control panel. The problem is that the left menu php file accesses a different database on my server then coppermine uses.

My aurora meter uses alaskastudio_com_aurora
Coppermine uses alaskastudio_com_photo

Because of this I get the error:
Database Error: Table 'alaskastudio_com_aurora.smf_sessions' doesn't exist

The error is true, but I can't figure out why it is not switching databases. Unfortunatly, I dont want to move the database for the aurora program to the Coppermine one as it is really big. I am trying to keep it running smoothly, and as quick as possable. Any sugesstions?
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Sami

Rename leftnav.php to leftnav.txt and attach it to this thread using Additional Options, to check the connection string
‍I don't answer to PM with support question
Please post your issue to related board

fareforce

#2
leftnav.php is actually composed of two files.

leftnav.php (which builds the left navigation layout, and aurora.php (the actual aurora program that accesses the database).

I have only included aurora.php (aurora.txt) as that should be the only one in question. I also added some notes so you can see what is going on easier. If for some reason you need the other one, please let me know.

Thank you so much in advance for your help.

~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Sami

okey you have variable conflict problem , bridge file for smf use the $db_name for smf database name :)
try to rename your $db_name under aurora to something else something like $ar_db_name
‍I don't answer to PM with support question
Please post your issue to related board

Nibbler

Are you using the same database username for coppermine or smf and aurora?

fareforce

Quote from: bmossavari on August 20, 2006, 12:37:21 PM
okey you have variable conflict problem , bridge file for smf use the $db_name for smf database name :)
try to rename your $db_name under aurora to something else something like $ar_db_name

I will try that.
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

fareforce

#6
Quote from: Nibbler on August 20, 2006, 12:55:59 PM
Are you using the same database username for coppermine or smf and aurora?
Yes - I also kust noticed that I left the username/password in the file. The file has been changed to erase them, and they have been changed.
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Nibbler

You'll need to either use different mysql users or add code to keep the database connections seperate.

fareforce

Quote from: bmossavari on August 20, 2006, 12:37:21 PM
okey you have variable conflict problem , bridge file for smf use the $db_name for smf database name :)
try to rename your $db_name under aurora to something else something like $ar_db_name

Now I get:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in /home/virtual/site3/fst/var/www/html/gallery/include/debugger.inc.php on line 112
Database Error: Table 'alaskastudio_com_aurora.smf_sessions' doesn't exist
File: /home/virtual/site3/fst/var/www/html/board/Sources/Load.php
Line: 1193
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Joachim Müller


Sami

@fareforce:
you didn't replace (change) all $db_name on the aurora meter files
‍I don't answer to PM with support question
Please post your issue to related board

fareforce

Quote from: bmossavari on August 20, 2006, 09:44:06 PM
@fareforce:
you didn't replace (change) all $db_name on the aurora meter files

I did, I just forgot to upload the new file.. here it is..
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

fareforce

Quote from: Nibbler on August 20, 2006, 07:50:48 PM
You'll need to either use different mysql users or add code to keep the database connections seperate.

add code to CPG or to aurora? Also, what code.. I thought re-establishing the connection would work. In aurora I terminate the connection very quickly to save on bandwidth.
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Nibbler

Yeah, but you are not actually re-establishing the connection. If you connect again to the same server with the same user then it will just re-use the connection you already had. Your code will then switch to the aurora database and confuse SMF when it cleans up your session. I can't come up with the code to fix it off the top of my head, you'll need to either switch users or code it yourself. Maybe disabling db sessions in SMF will help.

fareforce

Quote from: Nibbler on August 20, 2006, 10:49:47 PM
Yeah, but you are not actually re-establishing the connection. If you connect again to the same server with the same user then it will just re-use the connection you already had. Your code will then switch to the aurora database and confuse SMF when it cleans up your session. I can't come up with the code to fix it off the top of my head, you'll need to either switch users or code it yourself. Maybe disabling db sessions in SMF will help.

I will try it with a different sql login. Now I just have to remeber my root login.. LOL
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

fareforce

Well, as you said it works fine with 2 seperate logins. Now I just have to figure out why the program is blowing apart the template in cpg. It work fine everywhere else.
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com