Author Topic: URGENT! Major problem with vBulletin integration.  (Read 8849 times)

0 Members and 1 Guest are viewing this topic.

Offline X-Fan

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • http://www.comixfan.com/xfan/
URGENT! Major problem with vBulletin integration.
« on: October 10, 2002, 09:15:16 AM »
Jan or Nicky,

I'm currently experiencing a *HUGE* problem with the vBulletin integration of my 4images gallery.  Currently my site is reporting that there are 424 guests online.  That's not correct, however, as the vast majority of those guests are actually the one user with the same IP address and session ID viewing the details of images in my gallery!  8O

This has already caused my site to crash several times today.  It's been offline for over 8 hours thanks to an "out of memory" error caused by this problem!  :(

What can I do to fix this?  I really need a solution, and fast so that I can get my site stable again!
Eric J. Moreels
ComiX-Fan Editor-in-Chief
e-mail: webmaster@comixfan.cjb.net
Web: http://www.comixfan.com/xfan
AIM: XFan2k

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
URGENT! Major problem with vBulletin integration.
« Reply #1 on: October 10, 2002, 10:37:26 AM »
Empty the sessions table.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline X-Fan

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • http://www.comixfan.com/xfan/
URGENT! Major problem with vBulletin integration.
« Reply #2 on: October 10, 2002, 01:23:03 PM »
Quote from: Jan
Empty the sessions table.


Well here's hoping I can, because with the site crashing so much it's near impossible to log successfully into the database!

EDIT: Okay, I managed to empty the sessions table, but that same guest as before is still accessing numerous different files from the image gallery.

Whilst I greatly appreciate the quick fix, I can't sit here and clear the sessions table every 5-10 minutes so I've had to pull my image gallery offline.  Can anything be done to prevent this from happening?

For example, would it be possible to ban their IP address from accessing the image gallery, even though they're not a registered user?  At the very least, is there a quick way to reset every category/image to prevent guests from viewing them?

Preferably another solution, though, as banning the culprit wouldn't stop someone else from doing it, and I'd rather not prevent guests from viewing the gallery (downloading images yes, but I'd like them to see what's there).
Eric J. Moreels
ComiX-Fan Editor-in-Chief
e-mail: webmaster@comixfan.cjb.net
Web: http://www.comixfan.com/xfan
AIM: XFan2k

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
URGENT! Major problem with vBulletin integration.
« Reply #3 on: October 10, 2002, 05:36:25 PM »
Quick and dirty solutions:

Bann IP:

Open "includes/sessions.php" and add after
Code: [Select]
$this->user_ip = $this->get_user_ip();
this
Code: [Select]
if ($this->user_ip == "the.ip.here") {
  die("You're banned");
}


Set permissions of all categories to "Registered Users":

Run this query, for example with phpMyAdmin:
Code: [Select]
Update 4images_categories SET auth_viewcat = 2

I have also running vBulletin on another website and sometimes we had also a lot of users with the same IP. We asked in th vB forums and some users said that this could be a search engine robot spidering the website. Maybe... :?:

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline X-Fan

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • http://www.comixfan.com/xfan/
URGENT! Major problem with vBulletin integration.
« Reply #4 on: October 10, 2002, 06:01:49 PM »
Quote from: Jan
Quick and dirty solutions:


Thanks for those.  Is there any chance of a more permanent solution to stop it happening again?

Quote from: Jan
We asked in th vB forums and some users said that this could be a search engine robot spidering the website. Maybe... :?:


Doubtful.  Search engines don't sign up for user accounts and then try to look up passwords! ;)
Eric J. Moreels
ComiX-Fan Editor-in-Chief
e-mail: webmaster@comixfan.cjb.net
Web: http://www.comixfan.com/xfan
AIM: XFan2k

Offline Hac Nho

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: URGENT! Major problem with vBulletin integration.
« Reply #5 on: October 17, 2002, 06:11:37 AM »
Quote from: X-Fan
Jan or Nicky,
 the vast majority of those guests are actually the one user with the same IP address and session ID viewing the details of images in my gallery!  


I would think that this problem comes from the "online marking" system.

When a guest (with one IP) surf your album, his IP (and section) is going to be recorded. When he moves somewhere, or move out and backin the album, his chicken trail will again be recorded in to sections table.

NOTE that, In my vBp and vB, I have about 18 guests, when in 4images, I have only 5 guests. "Members online" are consistent in both vB, vBP, and 4images. Where those 13 extra guests come from? ;)



Dont know how to deal with this yet, anyone have the answer? ;)

PS. Shouldnt be any search engines, because the IP's going to be either one of your member's IP or someone's surfing your site. (mine's one member's IP)

Offline Hac Nho

  • Newbie
  • *
  • Posts: 25
    • View Profile
URGENT! Major problem with vBulletin integration.
« Reply #6 on: February 25, 2003, 08:28:00 AM »
x-Fan, did you have your problem solved?

.... my boards still getting a whole bunch of guests, and none of my members appeared in the online list are browsing album (no record for this) The record only show the last location in the album, that my member (if he/she is browsing album) was on.

....

if you did solve the problem, please share.

I now have to disable the start_session function in sessions.php:


Code: [Select]
 function start_session($user_id = GUEST, $login_process = 0) {
    global $site_db;
   
    $this->user_info = $this->load_user_info($user_id);
    if ($this->user_info['user_id'] != GUEST && !$login_process) {
      if ($this->read_cookie_data("bbpassword") == $this->user_info['user_password'] && $this->user_info['user_level'] > USER_AWAITING) {
        $this->set_cookie_data("bbpassword", $this->user_info['user_password']);
      }
      else {
        $this->set_cookie_data("bbpassword", "", 0);
        $this->user_info = $this->load_user_info(GUEST);
      }
    }
    $this->session_id = $this->generate_session_id();

 $sql = "";
/*    $sql = "INSERT INTO ".SESSIONS_TABLE."
            (sessionhash, userid, host, useragent, lastactivity, location, styleid)
            VALUES
            ('$this->session_id', ".$this->user_info['user_id'].", '$this->user_ip', '', $this->current_time, '$this->user_location', '".$this->read_cookie_data("bbstyleid")."')";
*/
...

Offline X-Fan

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • http://www.comixfan.com/xfan/
URGENT! Major problem with vBulletin integration.
« Reply #7 on: February 25, 2003, 09:35:46 AM »
Nope, I'm still having the same problem. :(
Eric J. Moreels
ComiX-Fan Editor-in-Chief
e-mail: webmaster@comixfan.cjb.net
Web: http://www.comixfan.com/xfan
AIM: XFan2k

Offline kaotic

  • Pre-Newbie
  • Posts: 2
    • View Profile
URGENT! Major problem with vBulletin integration.
« Reply #8 on: May 11, 2003, 03:31:04 AM »
Is there still no solution to this?

Offline kaotic

  • Pre-Newbie
  • Posts: 2
    • View Profile
URGENT! Major problem with vBulletin integration.
« Reply #9 on: May 12, 2003, 01:17:41 AM »
Quote from: mtha
I now have to disable the start_session function in sessions.php


Out of curiousity, what exactly are the consequences of disabling the start_session function, and what does it accomplish? Also, how would I go about doing this? Should I delete the code in the sessions.php file that you listed?