Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
5 registered (David Dreezer, Djuma, Harold, packlite, Sirdude), 26 Guests and 18 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 07/04/06
Posts: 4120
Top Posters (30 Days)
Ruben Rocha 103
Rick 81
Mark S 72
Thelockman 56
Gizmo 54
driv 35
ntdoc 32
Sirdude 29
packlite 24
AllenAyres 22
Latest Photos
bear test
Beach Barbie-Q
Sunset
Accept the challenge!
Trees
Topic Options
Rate This Topic
#219453 - 11/20/08 03:23 AM [FIXED for 7.4.2] Upload broken in 7.4.1
MacW Offline
newbie

Registered: 09/26/04
Posts: 35
Hi,

when I attempt to upload a plain JPEG file via the File Manager, UBBT fails with this error message:

Script: D:\_web\ptforum7\scripts\filemanager.inc.php
Line#: 282
SQL Error: Incorrect integer value: '' for column 'FILE_SIZE' at row 1
SQL Error #: 1366
Query: UPDATE ubbt_FILES SET FILE_NAME = '1854.jpg', FILE_ORIGINAL_NAME = 'Image1.jpg' , FILE_WIDTH = 0 , FILE_HEIGHT = 0 , FILE_SIZE = '' WHERE FILE_ID = 1854


The script is attempting to assign an empty string (?) to FILE_SIZE?

Top
#220301 - 12/16/08 06:36 PM Re: Upload broken in 7.4.1 [Re: MacW]
Seattlebrian Offline
stranger

Registered: 12/07/08
Posts: 14
I'm getting this same error.

Top
#220304 - 12/17/08 12:24 AM Re: Upload broken in 7.4.1 [Re: Seattlebrian]
Seattlebrian Offline
stranger

Registered: 12/07/08
Posts: 14
Do I get bonus points for fixing this myself?


In the file /scripts/filemanager.inc.php, add this code after line 272:
Php Code:
if ($file_size == '') {
	$file_size = filesize("{$config['FULL_PATH']}/tmp/$newname");
}
  


It should be just before the line that reads:
Php Code:
 $query = " 


Of course, be sure to make a copy of the original file in case you really break some thing. I believe this same script is used in image gallery as well. Hopefully this fix will be in 7.4.2.

Top
#220311 - 12/17/08 10:22 AM Re: Upload broken in 7.4.1 [Re: Seattlebrian]
AllenAyres Moderator Offline

****

Registered: 12/29/03
Posts: 1667
Loc: Texas
Yes you do, thank you Brian smile
_________________________
- Allen
- ThreadsDev | PraiseCafe

Top
#220373 - 12/19/08 11:52 AM Re: Upload broken in 7.4.1 [Re: AllenAyres]
Rick Administrator Offline

*****

Registered: 06/04/06
Posts: 7993
Loc: Aberdeen, WA
Thanks for the fix. Have this in for 7.4.2.
_________________________
UBB.threads™ Developer
My Personal Website · StogieSmokers.com

Top


Shout Box

Today's Birthdays
GOTMYSELFA...., smilinjack
Recent Topics
New members don't get access and are not displayed in the config panel
by Yomar
Today at 03:32 AM
How to Change Link Color / Underline in styles?
by ECNet
Yesterday at 10:00 PM
Chaging the "max online" number and date
by wanted
Yesterday at 02:22 PM
7.4.1. In Threaded Mode - "Mark All Read" Doesn't Work
by packlite
Yesterday at 10:26 AM
Custom island with sql connection
by Robje01
Yesterday at 09:13 AM
Forum Stats
4296 Members
33 Forums
30687 Topics
156014 Posts

Max Online: 978 @ 06/24/07 08:19 PM