vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Session problem on nonvb (https://vborg.vbsupport.ru/showthread.php?t=60769)

Matrixgl 01-26-2004 01:29 PM

Session problem on nonvb
 
I am trying to intigrate vB 2.3.3 with a cms that I am writing. Now, I have a header.php, that is contains the javascripts, basically like vB headerinclude that gets included in every page.

In that page, I have this piece of code:
PHP Code:

    require_once('/path/forums/global.php');
    if (!
$bbuserinfo['userid']) {
      echo 
" Login form here ";
     
    } 

and underneath that, I have the necessary codes to connect to my cms database.
PHP Code:

    $link mysql_connect("localhost""xxxxx""xxxxx");
    
mysql_select_db("gamerzli_cmsdb"$link); 

Now, when I browse my cms, I get an error, saying sessions cant be updated in the table (gamerzli_cmsdb.sessions). Its trying to find the sessions table in the wrong database.

Now, if I put the login check part AFTER my cms database connect code, sessions now work, but the cms database gets disconnected, and no data from there is displayed.

There are probably some kind of conflict going on, like one connection disconnecting other one, which seems obvious, but how do I get around it? Thanks!

Matrixgl 01-26-2004 09:17 PM

Anyone?


All times are GMT. The time now is 07:14 AM.

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.00993 seconds
  • Memory Usage 1,710KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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