vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Login Hack Produces Database Error (https://vborg.vbsupport.ru/showthread.php?t=95287)

wdwlegend 08-29-2005 05:20 PM

Login Hack Produces Database Error
 
My login hack uses the following code, so i can access the global $vbulletin:

PHP Code:

chdir("./forum/");
require(
'./global.php'); 
chdir("/"); 

which worked fine on 3.0.7, but on 3.5.0, everythings goes well until the page displays the following at the bottom:

Quote:

There seems to have been a problem with the Forums database.
Please try again by clicking the Refresh button in your web browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

---

Database error in vBulletin 3.5.0 Release Candidate 2:

Invalid SQL:

UPDATE session
SET lastactivity = 1125339316, location = '/index.php', inforum = 0, inthread = 0, incalendar = 0, badlocation = 0
WHERE sessionhash = '2204453e54c5f1e43f9a07ca23fb8562';

MySQL Error : Table 'main.session' doesn't exist
Error Number : 1146
Date : Monday, August 29th 2005 @ 07:15:16

It seems to want to connect to the session table on my "main" database. The database for my site is called: "main", the forum database is called: "main_forum").

Any ideas? Thx

Paul M 08-29-2005 05:22 PM

Wrong forum I think. :)

Andreas 08-29-2005 05:29 PM

Make sure that the PHP script you've embedded this does
- Use the same Database as vBulletin
OR
- Use another mySQL Username/Password
OR
- Create a new Link

wdwlegend 08-29-2005 06:40 PM

How would that make any difference?

It worked fine on the old version so any db connections shoudn't be affected.

Andreas 08-29-2005 06:42 PM

Well, don't know.
But fact is: It does change the Database on the same Link vBulletin uses.

merk 08-29-2005 08:41 PM

It looks like code furthur down in your hack modifies the db object to use the "main" database - you cant do this without causing errors like the above.

wdwlegend 08-30-2005 10:05 AM

Why does is spit the error at the bottom of the page if the request for global is at the start of execution?

Andreas 08-30-2005 11:45 AM

Shutdown Queries (Session Update, etc.)


All times are GMT. The time now is 07:52 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.01045 seconds
  • Memory Usage 1,723KB
  • 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)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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