View Issue Details

IDProjectCategoryView StatusLast Update
0011728mantisbtattachmentspublic2014-12-08 00:34
ReporteroscarAssigned Todhx 
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformChrome 4OSWindowsOS Version2003 Server
Product Version1.2.0 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0011728: Attachments error when downloading or viewing
Description

We have Mantis 1.2.0 installed on a shared hosting. The machine is a Linux server with PHP 5.2.11 and MySQL 5.0.89-community.
We can use all of it except we get an error when uploading / downloading all kind of files (PDF, JPG images, Word documents).

Steps To Reproduce

Go to http://apps.codytel.es/mantis/view.php?id=67
Enter with test / test data access.
At attachments try the wordpress-logo-300x282.JPG file.

Additional Information

Tried with Chrome 4.0.249, Firefox 3.0.6 and all have the same behaviour:


Always error when trying to view the Word document previously downloaded:
Damaged or corrupted


Sometimes error when trying to view the PDF document previously downloaded:
Damaged or corrupted

Seems to depend on the origin of the content printed to PDF (Word, browser...). Not tested all combinations.


Always error when trying to download / view a JPG image:

SYSTEM WARNING: finfo::finfo() [finfo.finfo]: Failed to load magic database at '/usr/share/misc/magic'.

SYSTEM WARNING: finfo::buffer() [finfo.buffer]: The invalid fileinfo object.

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /home/codytele/public_html/apps.codytel.es/mantis/core/error_api.php:202)

ÿØÿàJFIF`ÿÛC $.' ",#(7),01444'9=82<.342ÿÛC 2!!22222222222222222222222222222222222222222222222222ÿÀ,"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ?÷ú(¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ *6š4—UY5HWî‚ߥ^¤Åd>±!$G¯¹çü+Äþ:³ð¶&¡(Ž%Æé_û«þx ÃŒWÎübñ^£›‘qª;‘$Jv®xÉ#šÔ¶ø§â4¸U’ö'rþ˜ {¥¯%³ø©”>bÚÊý@W?C[ÿÀQöÝ-úÅ.ïæ(Ш®^Ãâ|9¹kvô•HŸJèm¯-¯=µÄS)Ê04=Q@Q@Q@Q@Q@Q@RPÑEQEQEQEQE! “@Ly5Üì÷ª³^àÏûFª’v’ÄÐƾSŸ-sîj¬·2?VãÐTñX±_±ô«QÛÅÝQŸS@"‰—‡×Šzi2°ÝWéÍlV‹<[¦x;E“RÔ¤àq*~y[²¨ÿ8 ßjz?ƒtY5=RåÏðÅãt¯Ù@ÿ8¯—|A¯j>0מöýŠ¢œC?$Kè?©ï] íî³ñÄgSÔ‰Ž!~ä)è?©ïT-4t{çÈ8i˜ÍniZ5ªiÖáâËœžüÖÕ®apÁž#œc!JÎ:ÆŸ†!!Â|£žœVžŸâ-/xSpGÕMmGà]2þ%Všê0~WýEZÿ…k:!zÌ

TagsNo tags attached.

Relationships

has duplicate 0014353 closedatrol error during viewing attachment 
child of 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

dhx

dhx

2010-03-31 03:04

reporter   ~0024935

You'll need to change $g_fileinfo_magic_db_file within config_inc.php to point to a valid magic.db file. It seems your system/environment has the Fileinfo extension available but the magic.db file is not in the standard /usr/share/misc/magic.db location that the Fileinfo extension tries to use by default.

I've added some further checks into the new 1.3.x check system to make it easier to debug incorrect Fileinfo settings.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036509

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master 666e231f

2010-03-31 07:01:04

dhx

Details Diff
Issue 0011728: Add Fileinfo checks to admin/check/

Add some further checks to check_attachments_inc.php as part of the new
configuration/environment check script in 1.3.x to verify that Fileinfo
is configured correctly.
mod - admin/check/check_attachments_inc.php Diff File

Issue History

Date Modified Username Field Change
2010-03-30 04:07 oscar New Issue
2010-03-31 03:04 dhx Note Added: 0024935
2010-03-31 03:04 dhx Status new => resolved
2010-03-31 03:04 dhx Fixed in Version => 1.3.0-beta.1
2010-03-31 03:04 dhx Resolution open => fixed
2010-03-31 03:04 dhx Assigned To => dhx
2010-03-31 03:05 dhx Target Version => 1.3.0-beta.1
2010-03-31 03:05 dhx Additional Information Updated View Revisions
2010-03-31 03:10 dhx Changeset attached master 666e231f =>
2010-06-09 03:45 dhx Status resolved => closed
2012-06-07 14:14 atrol Relationship added has duplicate 0014353
2013-04-05 17:57 grangeway Status closed => acknowledged
2013-04-05 17:57 grangeway Note Added: 0036509
2013-04-05 18:03 grangeway Relationship added child of 0015721
2013-04-06 03:44 dregad Status acknowledged => resolved
2013-04-06 07:20 grangeway Status resolved => acknowledged
2013-04-06 09:26 dregad Tag Attached: 2.0.x check
2013-04-06 09:26 dregad Status acknowledged => resolved
2014-09-23 18:05 grangeway Tag Detached: 2.0.x check
2014-12-08 00:34 vboctor Status resolved => closed