Bug #593

Image upload

Added by Stefan T. about 2 years ago. Updated about 2 years ago.

Status:Closed Start date:12/17/2009
Priority:Normal Due date:
Assignee:Tom Moore % Done:

100%

Category:Other
Target version:1.4.12
Reproducibility:Always Database Type:
Reported In MyBB Version:1.6.0 Database Version:
PHP Version:5.3.1 SQA assignments:
Browser:

Description

When I attach an image I get this warning:

The following warnings occurred: 
Warning [2] finfo_file(): File or path not found '200912/post_1_1261058161_495fe1bb2146b4b7ac5fdff12a32b417.attach' - Line: 536 - File: inc/functions_upload.php PHP 5.3.1 (Linux)File    Line    Function
[PHP]         errorHandler->error
/inc/functions_upload.php    536    finfo_file
/newthread.php    151    upload_attachment

The attachment is uploaded and usable.

Associated revisions

Revision 4654
Added by Tom Moore about 2 years ago

Fixes Image upload (fixes:593)

History

Updated by Ryan Gordon about 2 years ago

Can you repro this on 1.4?

Updated by Tom Moore about 2 years ago

I can't replicate on 1.4 or trunk with PHP 5.3.0... I can add an image without any problems. Using Server 2008 R2.

Updated by Stefan T. about 2 years ago

Your fileinfo extension is enabled?
The problem is clear: The upload path is missing.

Updated by Tom Moore about 2 years ago

I thought the extension was enabled but turns out it isn't. magic_mime and finfo don't seem to like Windows very much...

I wonder if you add the uploads path to the $filename variable in the call to the function, it will work?

Updated by Ryan Gordon about 2 years ago

  • Status changed from New to Assigned
  • Assignee set to Tom Moore
  • Target version set to 1.4.12

Updated by Tom Moore about 2 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4654.

Updated by Stefan T. about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF