vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   vbb and several databases do not work? (https://vborg.vbsupport.ru/showthread.php?t=46775)

triden 12-18-2002 05:26 PM

vbb and several databases do not work?
 
Hi there,

i user 4 databases. in 1 database are all the data for vbulletin.
in the other 3 are relevant data for my project.

within my application i have to switch between the 4 databases, so i created a base db_mysql where i create db_sql_base1, db_sql_base2, db_sql_base3 and db_sql_base4.
within the application i have no problems at all.
unfortunally it seems that vbulletin is not able to "stay" at the database "base1" because it tries to use the database which is be used at the moment it want to write.
for example:

the lastactivity want to be written in base1. actually the source is working in base3. (vbulletin is still using the original db_mysql with the DB_sql_vb in the original directory).
in this case i get a email with the errormessage "table base3.user" doesnt exist. i can sove it by creating a table by the name user, but offcourse it is the wring solution.

my question, how can i tell vbulletin, or where is it written, that he allway should use the database from ./admin/db_mysql.php

all databases have their own strukture. alle have there own includes (not for the db_mysql) and their own config file where $DB_site-> will be declared.

i hope it was enough information. i am a little desperate, search for the problem over one week very intensiv...

TECK 12-19-2002 04:14 AM

Try in vBulletin the include_once() function, instead of require().
What database you have in config.php?

triden 12-19-2002 06:32 AM

thanks for reply.

well the strukture is based on standalone modules.
that means that i want to be able to take out one module and make it a stand alone feature. ´vbb ist always using the SB_mysql_vb funktion but every module with his directory schedule has his own configuration. also the config.php
except of the db_mysql_alldb (with is lokated in the base modul, all modules use this db to open the 4 dbs) and the db_mysql of the forum strukture. this is used by the forum.

in the config (for example base 1) i open DB_site = new DB_sql_vb AND DB_base1 = new DB_sql_base1

in the config (for example base 2) i open DB_site = new DB_sql_vb AND DB_base2 = new DB_sql_base2

therefor it must be garanteed, that vbb use his own database and should make all chanches to DB_site-> in the correct db.
but it seems that DB_site-> is not using the db opend with DB_sql_vb. i checked toe complte vbb software. i can´t find the problem.

should it be better to use only one config.php? open all dbs in there? it meens i have to change complete strukture but if it works

ps. in the config located in ./admin/ the base1 (correct) db is opend.


All times are GMT. The time now is 09:58 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01144 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete