Previous Thread
Next Thread
Print Thread
Hop To
Joined: Sep 2004
Posts: 29
M
newbie
newbie
M Offline
Joined: Sep 2004
Posts: 29
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?

Joined: Dec 2008
Posts: 14
S
stranger
stranger
S Offline
Joined: Dec 2008
Posts: 14
I'm getting this same error.

Joined: Dec 2008
Posts: 14
S
stranger
stranger
S Offline
Joined: Dec 2008
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.


Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
Yes you do, thank you Brian smile


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Thanks for the fix. Have this in for 7.4.2.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
3 members (rootman, Gizmo, Nightcrawler), 562 guests, and 186 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)