Page 1 of 1

Upload attachment results in a clear screen...

Posted: 19 Jul 2006, 04:57
by palula
I was trying to attach a file to Mantis because I was concerned about several problems within the forum about uploading bigger files...
Anyway... I uploaded a file of 1,67 MB. My Mantis is configured to handle files up to 2 MB.

Ok, so when I tried to upload the files, Mantis just stopped and returned a blank screen. It simply gave no response about what error could be happening... Just a plain blank screen appeared.

Has anybody gone through this?
Thank you!

P.S.: Small files work nicely... I uploaded a 400 KB file this week and it worked fine.

Posted: 19 Jul 2006, 16:58
by mroeder
Here's what I think is happening: PHP can be set to report the specifics of a runtime error or, for security reasons, to just barf and not say anything. Your installation is (properly) set to not report any php errors. In the php.ini file, find display_errors and turn it on. Restart Apache, then induce that error. The page will now give you a detailed report about what went wrong.

Be sure to turn that back off again if your web site is outside on the Big Bad Internet: It's a security risk.

Posted: 24 Jul 2006, 18:40
by palula
Nice work mroeder.
The result screen is blank because of the display_errors = Off in display_errors segment.

So I turned on the display_errors and induced the error again and received this response from Mantis:

Code: Select all

Fatal Error: 401 in (drive):\(path_to_mantis)\core\database_api.php on line 128.
I looked at that line and turns out to be:

Code: Select all

trigger_error( ERROR_DB_QUERY_FAILED, ERROR );
Have you guys ever been through this? Is this a known bug? Am I missing something?

Thanks! :)

Posted: 24 Jul 2006, 20:10
by mroeder
At this point you might have to sleuth it... I'm going to fall back on the standard Unix universal solution: "Are the file persmissions correct"?

Posted: 26 Jul 2006, 16:46
by palula
The file permissions for the hole mantis folder tree is:

Owner of all files: apache;
Group of all files: apache;
Chmod for all files: rwx------ (700).

Did this by entering the Mantis folder and typing:

chown -R apache *
chgrp -R apache *
chmod -R 700 *

Is this Ok?

Posted: 28 Jul 2006, 16:11
by mroeder
But the files you upload end up in a different folder: Each project can have its own folder for uploading files. (That's over in Manage Projects.) That directory has to exist and have permissions. It's complicated who allt he unix users are who write and read files, so I just set the upload directory permissions to 777.

Posted: 02 Aug 2006, 14:17
by palula
But for uploading files i'm using method: DATABASE
Is this wrong?