File upload help needed!

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
pmtthinh
Posts: 1
Joined: 23 Nov 2005, 03:18

File upload help needed!

Post by pmtthinh »

Hi,

I'm using Mantis 1.0.0rc3

I have config the upload file as folow:
upload file = ON and TRUE in php.ini
upload method = DATABASE
max file size 2MB
allowed file and disallowed file are left empty
and have also put the absolute path (a folder on the server)

but it keeps saying when I try to upload a file (either in Docs link and in a specific project) that File upload failed. File is not readable by Mantis. Please check project settings.

Anybody know about this problem. I appreciate your helps
Thanks a lot!
thinhphan

Post by thinhphan »

I have set Mantis up on Windows 2000 Advanced Server, and it works fine for the file upload with the settings as follow:

$g_file_upload_method = DISK;
$g_allowed_files = '';
$g_disallowed_files = '';
$g_document_files_prefix = 'doc';
$g_absolute_path_default_upload_folder = "..\upload\\";

but when I move it to another server installing Windows XP SP2 (of course, after changing a little bit of config. with the folder) it keeps saying "Application Error #15 File upload failed. File is not readable by Mantis. Please check the project settings". I don't know why, anybody know how to get through with it?

One thing I note is that the upload folder that I created on WinXP always has the Read Only attribute, which I think had banned users from uploading the files into the server. Am I right?

Your help is much appreciated!
rata
Posts: 9
Joined: 18 Feb 2005, 02:10

Post by rata »

pmtthinh - What size file are you trying to upload? If you are using mysql as your database, you may need to change an entry in the my.cnf file. Set max_allowed_packet = 2M. The default is 1M which means the upload will fail if the file is larger than 1M.

Cheers
Ray
thinhphan

Post by thinhphan »

Hi rata, I'm pmtthinh. I don't know what file did you mention but I have searched for files in both mysql, php, and mantis but haven't seen that tag?
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

thinhphan: was it that you couldn't find the tag, or couldn't find the file?

Windows (not sure if all versions do, but a few do) hide the .cnf extension no matter what your preferences are.

Instead, look for a file simply named 'my' that has an icon that looks like a shortcut to a telephone thingy... that's the my.cnf file.
thinhphan

Post by thinhphan »

Hi Narcissus,

I couldn't find the file my.cnf, instead I found these files with the tag max_allowed_packet in the content:
my-huge.cnf
my-innodb-heavy-4G.cnf
my-large.cnf
my-medium.cnf
my-small.cnf

So which files should I changed the tag? Or changing all of them?

Thanks for your help!
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

In your Services window (can't remember where it's found in Windows 2000) view the properties of your MySQL service.

The 'path to executable' should have the correct cnf file listed as the defaults-file parameter. For example, my 'path to executable' is 'E:\xampp\mysql\bin\mysqld-nt --defaults-file=E:\xampp\mysql\bin\my.cnf mysql'.

Now that all changes if you're not using the MySQL service but at the end of the day, no matter how you start MySQL I believe that that is where you will find the defaults file that is being used.
Post Reply