Page 1 of 1

upload error

Posted: 09 Jun 2005, 07:13
by Reinder
The upload function suddenly does not work. The directory entered in the project details exists and has CHmod 777. But when I try to upload the following error occures:

APPLICATION ERROR #15
File upload failed. File is not readable by Mantis. Please check the project settings

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

the upload setting is set to "ON". The upload size can be 5M (set in php.ini). I try to upload a jpg file (131 k). The settings are as follows:

# --- file upload settings --------
# This is the master setting to disable *all* file uploading functionality
#
# If you want to allow file uploads, you must also make sure that they are
# enabled in php. You may need to add 'file_uploads = TRUE' to your php.ini
#
# See also: $g_upload_project_file_threshold, $g_upload_bug_file_threshold,
# $g_allow_reporter_upload
$g_allow_file_upload = ON;

# Upload destination: specify actual location in project settings
# DISK, DATABASE, or FTP.
$g_file_upload_method = DATABASE;

# FTP settings, used if $g_file_upload_method = FTP
$g_file_upload_ftp_server = 'ftp.myserver.com';
$g_file_upload_ftp_user = 'readwriteuser';
$g_file_upload_ftp_pass = 'readwritepass';

# Maximum file size that can be uploaded
# Also check your PHP settings (default is usually 2MBs)
$g_max_file_size = 5000000; # 5 MB

# Files that are allowed or not allowed. Separate items by commas.
# eg. 'php,html,java,exe,pl'
# if $g_allowed_files is filled in NO other file types will be allowed.
# $g_disallowed_files takes precedence over $g_allowed_files
$g_allowed_files = '';
$g_disallowed_files = '';

# prefix to be used for the file system names of files uploaded to projects.
# Eg: doc-001-myprojdoc.zip
$g_document_files_prefix = 'doc';

# absolute path to the default upload folder. Requires trailing / or \
$g_absolute_path_default_upload_folder = '';

What can be wrong?

Posted: 17 Jun 2005, 16:41
by thraxisp
What OS is this running on? What version of Mantis? What version of php?

Posted: 01 Jul 2005, 07:58
by Reinder
This is running on windows (xp professional). It was working before I installed 1.0.0.a3 but after installation it failed. PHP is version 5.0.4

Posted: 01 Jul 2005, 19:02
by thraxisp
The uploaded file is stored in some temporary area after upload. I believe that IIS needs some extra permissions on this directory (akin to global read access on Linux).

Posted: 04 Jul 2005, 06:06
by Reinder
Thats what I thought so I gave the whole dir (root) the read/write rights. In the php.ini (in the php dir as well as the windows dir) I entered the following line:

upload_tmp_dir = C:\Inetpub\wwwroot\mantis\doc

where mantis is the root dir and the doc dir also has read/write rights. This does not seem to have any effect.

In the php.ini file what should be the statement;
file_uploads = ON or
file_uploads = TRUE

Posted: 05 Jul 2005, 18:55
by thraxisp
I believe that it's "ON".

Posted: 06 Jul 2005, 06:03
by Reinder
I should read before I write.....: "You may need to add 'file_uploads = TRUE' to your php.ini" However, when doing this (in both php.ini files in c:\php and c:\windows) and filling in the config as follows, it still does not work (still get error 15)

###################################
# Mantis File Upload Settings
###################################

# --- file upload settings --------
# This is the master setting to disable *all* file uploading functionality
#
# If you want to allow file uploads, you must also make sure that they are
# enabled in php. You may need to add 'file_uploads = TRUE' to your php.ini
#
# See also: $g_upload_project_file_threshold, $g_upload_bug_file_threshold,
# $g_allow_reporter_upload
$g_allow_file_upload = ON;

# Upload destination: specify actual location in project settings
# DISK, DATABASE, or FTP.
$g_file_upload_method = DISK;

# FTP settings, used if $g_file_upload_method = FTP
$g_file_upload_ftp_server = '10.35.26.171';
$g_file_upload_ftp_user = 'anonymous';
$g_file_upload_ftp_pass = 'anonymous';

# Maximum file size that can be uploaded
# Also check your PHP settings (default is usually 2MBs)
$g_max_file_size = 2000000; # 2 MB

# Files that are allowed or not allowed. Separate items by commas.
# eg. 'php,html,java,exe,pl'
# if $g_allowed_files is filled in NO other file types will be allowed.
# $g_disallowed_files takes precedence over $g_allowed_files
$g_allowed_files = '';
$g_disallowed_files = '';

# prefix to be used for the file system names of files uploaded to projects.
# Eg: doc-001-myprojdoc.zip
$g_document_files_prefix = '';

# absolute path to the default upload folder. Requires trailing / or \
$g_absolute_path_default_upload_folder = 'C:/Inetpub/wwwroot/mantis/';

version ?????

Posted: 06 Jul 2005, 06:13
by Reinder
This is strange. I just checked an older version of Mantis and here the upload works. So I presumed it had something to do with the config. So I copied the old config to the new mantis. Still the upload does not work........They use the same database so the project settings should not be the problem (as well as the upload dir).

it works !!!

Posted: 06 Jul 2005, 06:48
by Reinder
Damn, don't know what happened, but I copied the new version over the older version and it now works. so I think that the old version has a file that the newer one does not have? I really am mistified, but alas it works !! Tnx for all the help !!!

Posted: 06 Feb 2006, 21:33
by Guest
Reinder wrote:I should read before I write.....: "You may need to add 'file_uploads = TRUE' to your php.ini" However, when doing this (in both php.ini files in c:\php and c:\windows) and filling in the config as follows, it still does not work (still get error 15)

###################################
# Mantis File Upload Settings
###################################

# --- file upload settings --------
# This is the master setting to disable *all* file uploading functionality
#
# If you want to allow file uploads, you must also make sure that they are
# enabled in php. You may need to add 'file_uploads = TRUE' to your php.ini
#
# See also: $g_upload_project_file_threshold, $g_upload_bug_file_threshold,
# $g_allow_reporter_upload
$g_allow_file_upload = ON;

# Upload destination: specify actual location in project settings
# DISK, DATABASE, or FTP.
$g_file_upload_method = DISK;

# FTP settings, used if $g_file_upload_method = FTP
$g_file_upload_ftp_server = '10.35.26.171';
$g_file_upload_ftp_user = 'anonymous';
$g_file_upload_ftp_pass = 'anonymous';

# Maximum file size that can be uploaded
# Also check your PHP settings (default is usually 2MBs)
$g_max_file_size = 2000000; # 2 MB

# Files that are allowed or not allowed. Separate items by commas.
# eg. 'php,html,java,exe,pl'
# if $g_allowed_files is filled in NO other file types will be allowed.
# $g_disallowed_files takes precedence over $g_allowed_files
$g_allowed_files = '';
$g_disallowed_files = '';

# prefix to be used for the file system names of files uploaded to projects.
# Eg: doc-001-myprojdoc.zip
$g_document_files_prefix = '';

# absolute path to the default upload folder. Requires trailing / or \
$g_absolute_path_default_upload_folder = 'C:/Inetpub/wwwroot/mantis/';