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?
upload error
Moderators: Developer, Contributor
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
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
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/';
###################################
# 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 ?????
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 !!!
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
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/';