Bug #26968 not able to upload files
Submitted: 8 Mar 2007 18:50 Modified: 14 Jan 2008 9:39
Reporter: Troy Luschen Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Eventum Severity:S3 (Non-critical)
Version:1.7.1 OS:Windows (Windows 2003 Server)
Assigned to: Bryan Alsdorf CPU Architecture:Any
Tags: file, upload

[8 Mar 2007 18:50] Troy Luschen
Description:
I get the error "An error occurred while trying to process the uploaded file." when trying to upload a file.

I have tried making sure the filenames have no spaces in them, and tried different file types (.txt, .jpg).

How to repeat:
When viewing the details of an issue try to upload a file to it.  Leave the Status on public, choose one file, type a description and click "Upload File."
[8 Mar 2007 19:46] Bryan Alsdorf
Hi,

Are there any errors in either the PHP or Eventum error log?

The Eventum log is located in eventum/logs/errors.log

Best Regards,
/bryan
[8 Mar 2007 20:03] Troy Luschen
The eventum error log didn't have any errors regarding this (the errors it did have were related back to another problem in January which I fixed).  

PHP is set not recording errors.  I know PHP is working because I have another application that does file uploads and it works fine.
[8 Mar 2007 20:13] Bryan Alsdorf
If there are no error messages you will need to add debug information to class.attachment.php, the attach() method.

Best Regards,
/bryan
[8 Mar 2007 20:20] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 1.7.1, and inform about the results.
[8 Mar 2007 21:10] Troy Luschen
Sorry, I'm not understanding where to get the debug information from to add to class.attachment.php.  I would like to try to get some debug info first before attempting an upgrade.
[8 Mar 2007 21:17] Troy Luschen
The version I have is 1.7.1.  I downloaded it January 10, 2007 and kept the original file, but for some reason in the Eventum itself it says it is 1.7.1 (on the bottom in the footer).  Version 1.7.0 came out December 29, 2005 and I know for sure that I clicked the top link for the newest stable version.
[8 Mar 2007 21:19] Troy Luschen
Correction to last comment:

"...but for some reason in the Eventum itself it says it is 1.7.1..." 

should say:

"...but for some reason in the Eventum itself it says it is 1.7.0...".
[12 Mar 2007 17:27] Troy Luschen
How do I add debug information to class.attachment.php? How is the attach() method used to do so?

Thank you.
[14 Mar 2007 0:50] Bryan Alsdorf
Open include/class.attachment.php, go to the addFile method (line 501 in my copy).  Look for this line:

$res = $GLOBALS["db_api"]->dbh->query($stmt);

directly after that line add this:

var_dump($res);
[14 Mar 2007 19:04] Troy Luschen
I added it like you said but I'm not getting any defug info...either in the browser or the error log file.  I've also tried placing "var_dump($res);" at a couple other locations in the same addFile function.  Trying "var_dump($filename);" didn't produce anything either.  I'll attach my class.attachment.php file for you.

Any other ideas?
[14 Mar 2007 19:06] Troy Luschen
My class.attachment.php file

Attachment: class.attachment.php (text/plain), 23.38 KiB.