upload error

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

upload error

Post 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?
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

What OS is this running on? What version of Mantis? What version of php?
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Post 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
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post 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).
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Post 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
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

I believe that it's "ON".
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Post 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/';
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

version ?????

Post 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).
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

it works !!!

Post 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 !!!
Guest

Post 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/';
Post Reply