View Issue Details

IDProjectCategoryView StatusLast Update
0006023mantisbtdocumentationpublic2007-11-26 16:21
ReporterPatPowerMan Assigned To 
Status confirmedResolutionopen 
Summary0006023: READ-Rights needed for upload-temp-directory and Windows2003/IIS 6.0 and PHP

Please add a installation-hint about the APPLICATION ERROR #15

I wrote a little comment here:

Steps To Reproduce

It would be helpful if you could add a check for windows-machines in the \admin\check.php

TagsNo tags attached.


child of 0004181 closed Features in Mantis 1.1 release 




2005-07-27 15:09

reporter   ~0010989

A partial fix has been added to CVS. This checks the file system when the project information is created or updated.
core/file_api.php -> 1.71

Longer term, an admin check does need to walk through each project and check that the system is still operational.



2007-11-26 16:19

reporter   ~0016296

Last edited: 2007-11-26 16:21

I had this problem on IIS. This is what I did.

Edit "core/file_api.php" file

Remark this line :
#if ( !is_readable( $p_tmp_file ) ) {
Change it to :
if ( !is_uploaded_file( $p_tmp_file ) ) {

Then go to this line and remark these 3 lines :

if ( 0 == $t_file_size ) {

#       trigger_error( ERROR_FILE_NO_UPLOAD_FAILURE, ERROR );
    # }

This is because for some reason in IIS filesize shows zero size after upload in the MySQL DB !. So we can not check for file size.. (someone here may have a better idea on how to check the size if needed).

Then go to this line and remark this line :

$c_content = db_prepare_binary_string ( fread ( fopen( $p_tmp_file, 'rb' ), $t_file_size ) ) ;

Now add the below two lines :
$c_content = db_prepare_binary_string ( fread ( fopen( $p_tmp_file, 'rb' ), $tt_file_size ) ) ;

In the above line we define a static file size for all attachments to 9MB.
So that in the MySQL all attachemnts will show as 9MB (this is better than showing 0 MB in the Database !).

That's it.
Now you file upload must work fine in Mantis..
This is a quick hack and you can later modify to check for file size etc..

Issue History

Date Modified Username Field Change
2005-07-27 02:55 PatPowerMan New Issue
2005-07-27 15:09 thraxisp Note Added: 0010989
2005-07-27 15:09 thraxisp Status new => confirmed
2005-07-27 15:10 thraxisp Relationship added child of 0004181
2005-12-06 19:04 jlatour Severity block => major
2007-11-26 16:19 jim555 Note Added: 0016296
2007-11-26 16:21 jim555 Note Edited: 0016296