View Issue Details

IDProjectCategoryView StatusLast Update
0005544mantisbtdb mssqlpublic2014-05-16 15:00
Reportergriddly Assigned Tograngeway  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.0a2 
Fixed in Version1.1.0a4 
Summary0005544: MSSQL APPLICATION ERROR 0000401 When Uploading Files
Description

I currently have SQL SVR 2000 SP3 installed and version Mantis 1.0.0a2, PHP 4.3.6.6, IIS6, windows svr 2003 I made the appropriate mods to the old MSSQL.SQL File to accomodate for the missing fields. MANTIS Works fine, with exception of uploading Files. The appearance is that it reads the internal contents of the file and errors with an

APPLICATION ERROR 0000401
Database query failed. Error received from database was 0000105: Unclosed quotation mark before the character string ')'. for the query: INSERT INTO mantis_bug_file_table
(bug_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content)

Additional Information

Since the Post on the forums I have come to find out that this happens frequently on other pages as well regardless of file type. It is Hit or miss at this point as to whether it is succesful or not.

TagsNo tags attached.
Attached Files
HANG.jpg (27,460 bytes)   
HANG.jpg (27,460 bytes)   

Activities

thraxisp

thraxisp

2005-04-29 14:37

reporter   ~0009970

I think that our method of escaping quotes may be incorrect.

griddly

griddly

2005-04-29 18:45

reporter   ~0009976

What Can I provide to you in order to diagnose? I did further investigation and found that it depends on the content of the file. Seems that Because it is reading the internal comments of the file it is delineating the "commas" as field seperaters? its just kinda odd to me as I thought it only imports the file and not open it.

grangeway

grangeway

2005-05-07 07:52

reporter   ~0010044

your value of magic_quotes_sybase is ?

griddly

griddly

2005-05-09 19:28

reporter   ~0010054

Last edited: 2005-05-09 19:32

Not sure where to find the information you are asking for? I dont recall setting a variable for this.

thraxisp

thraxisp

2005-05-09 21:32

reporter   ~0010055

I think that we're not escaping enough characters. We use "addslashes" to escape ('), ("), () and (null). The MSSQL manual says that other characters (ref http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vjref98/html/3_10_5.asp ).

The php variables "magic_quotes_sybase" and "magic_quotes_gpc" affect how this works.

grangeway

grangeway

2005-05-10 08:11

reporter   ~0010061

I was thinking about changing mantis to use qstr from adodb instead of the current match of functions, however the implementation of qstr in adodb looked to me as a) possibly not dealing with this case b) being incomplete - or at least requiring the adodb c php library. This was just from a quick code browse without actually running it.

http://phplens.com/adodb/reference.functions.qstr.html

However, in theory if it works, this is probably the function that should replace the current call to addslashes that we make.

griddly

griddly

2005-05-10 15:31

reporter   ~0010070

From the information given I was able to find this in the PHP.INI magic_quotes_sybase = Off and magic_quotes_gpc = On

grangeway

grangeway

2005-05-13 19:45

reporter   ~0010125

iirc, magic_quotes_sybase should be set to on for mssql.

Paul

griddly

griddly

2005-05-16 14:42

reporter   ~0010142

Last edited: 2005-05-16 16:08

Set magic_quotes_sybase = On and this resolved the issue, however at this point the download "HANGS", You can Click an Attachment link, Get the File open or save dialog, after clicking Either button it hangs. I attached a screen shot.

Seems to be related in some fashion to Bug 0005533. I have updated Fle_Download.php to ver 135 from the CVS to see if this resolves it, however No Joy.

This Install is not https. and it only works with Text Files.

tballister

tballister

2007-01-29 18:52

reporter   ~0013976

Last edited: 2007-01-29 18:54

Please see 0005904 for my input and resolution on this.
Love Mantis.

stephenm

stephenm

2007-02-08 15:20

reporter   ~0014015

Probably the same core problem.
Uploading a 2.3Mb .bmp (a screenshot) with a theoretical 5Mb limit on attachment size.
I consistently get
APPLICATION ERROR 0000401
followed by a lot of binary characters.

Client: Firefox2 on WinXP
Server: RH Linux, DB MySQL. Not sure on versions but should be reasonably recent stable versions.

grangeway

grangeway

2007-07-23 17:39

reporter   ~0015188

Hello all,

i've just commited a fix to CVS for inclusion for 1.1.0a4 which appears to fix this issue.

Paul

grangeway

grangeway

2014-05-16 15:00

reporter   ~0040412

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.

Thanks
Paul