View Issue Details

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

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

http://bugs.mantisbt.org/view.php?id=5280

I wrote a little comment here: http://manual.mantisbt.org/manual.installation.requirements.php?sfgdata=4

Steps To Reproduce

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

TagsNo tags attached.

Relationships

child of 0004181 closed Features in Mantis 1.1 release 

Activities

thraxisp

thraxisp

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.

jim555

jim555

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 :
$tt_file_size="9000000";
$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..