Status
Not open for further replies.

hakkuo23

Customer
Code:
Database error in vBulletin 4.2.0:

Invalid SQL:

					SELECT attachmentid, attachment.userid, filesize, thread.forumid
					FROM vb_attachment AS attachment
					LEFT JOIN vb_post AS post ON (post.postid = attachment.postid)
					LEFT JOIN vb_thread AS thread ON (post.threadid = thread.threadid)
					WHERE attachmentid =;

MySQL Error   : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5
Error Number  : 1064
Request Date  : Wednesday, September 26th 2012 @ 12:43:51 PM
Error Date    : Wednesday, September 26th 2012 @ 12:43:52 PM
Script        : http://xenogamers.org/member.php?u=92
Referrer      : http://xenogamers.org/member.php?u=92
IP Address    : xxxx
Username      : silence
Classname     : vB_Database_MySQLi
MySQL Version : 5.1.65-cll
 
Does this happen to all member profiles or just this guy? Does he have an attachment listed somewhere on it?
 
Just this guy (all other profiles work) Also I just switched to ImageMagick so that might be a variable.
 
Can you temp disable vbcredits and take a look at his profile? I am not sure why the code for attachment downloading is happening during a profile viewing. my guess is an attachment image was posted there somewhere, and i just wanna confirm :)
 
Right, but did you notice someone had posted an attachment in a wall message to them, or they used an attachment as their profile picture? something like that
 
I have profile pics disabled, that is just their forum avatar at the top-right of their profile. There are no attachments in Visitor Messages only images to offsite photos.
 
Edit (forums)/dbtech/credits/credits_vbulletin.php find

PHP:
"attachmentid = " . $vbulletin->GPC['attachmentid'])

replace with

PHP:
"attachmentid = " . intval($vbulletin->GPC['attachmentid']))
 
http://xenogamers.org/member.php?u=92

There is still a database error on that link and also in here:

https://xenogamers.org/gallery.php?do=attachments

Code:
Database error in vBulletin 4.2.0:

Invalid SQL:

					SELECT attachmentid, attachment.userid, filesize, thread.forumid
					FROM vb_attachment AS attachment
					LEFT JOIN vb_post AS post ON (post.postid = attachment.postid)
					LEFT JOIN vb_thread AS thread ON (post.threadid = thread.threadid)
					WHERE attachmentid = 0;

MySQL Error   : Unknown column 'filesize' in 'field list'
Error Number  : 1054
Request Date  : Monday, October 1st 2012 @ 11:13:05 PM
Error Date    : Monday, October 1st 2012 @ 11:13:05 PM
Script        : http://xenogamers.org/gallery.php?do=attachments
Referrer      : https://xenogamers.org/gallery.php
IP Address    : xxxxxx
Username      : silence
Classname     : vB_Database_MySQLi
MySQL Version : 5.1.65-cll
 
edit (forums)/dbtech/credits/credits_vbulletin.php find

PHP:
if (!$vbulletin->GPC['thumb'])

replace with

PHP:
if (!$vbulletin->GPC['thumb'] AND ($vbulletin->GPC['attachmentid'] OR $vbulletin->GPC['postid']))

let me know if that fixes both for you
 
Problem arose in albums.

https://xenogamers.org/album.php?albumid=33&attachmentid=3597

Code:
Database error in vBulletin 4.2.0:

Invalid SQL:

					SELECT attachmentid, attachment.userid, filesize, thread.forumid
					FROM vb_attachment AS attachment
					LEFT JOIN vb_post AS post ON (post.postid = attachment.postid)
					LEFT JOIN vb_thread AS thread ON (post.threadid = thread.threadid)
					WHERE attachmentid = 3597;

MySQL Error   : Unknown column 'filesize' in 'field list'
Error Number  : 1054
Request Date  : Tuesday, October 9th 2012 @ 12:37:07 PM
Error Date    : Tuesday, October 9th 2012 @ 12:37:07 PM
Script        : http://xenogamers.org/album.php?albumid=33&attachmentid=3597
Referrer      : https://xenogamers.org/album.php?albumid=33
IP Address    : xxxxxxx
Username      : silence
Classname     : vB_Database_MySQLi
MySQL Version : 5.1.65-cll
 
Edit the vBCredits II - Download plugin and set the PHP contents to:

PHP:
if (THIS_SCRIPT == 'attachment') VBCREDITS_VBULLETIN::download();
 
Status
Not open for further replies.

Legacy vBCredits II Deluxe

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
845
Customer rating
0.00 star(s) 0 ratings
Back
Top