Closed (fixed)
Project:
Web File Manager
Version:
5.x-1.5
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
5 Apr 2007 at 20:09 UTC
Updated:
31 May 2007 at 15:02 UTC
I can upload files to the ftp folder without incident, but when I try to upload to the webfm folder I receive an error something like the following:
* user warning: Field 'fdesc' doesn't have a default value query: INSERT INTO webfm_file (uid, fpath, fname, fsize, fmime) VALUES (1, 'files/webfm/test_image.jpg', 'test_image.jpg', 173690, 'image/jpeg') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal\includes\database.mysql.inc on line 172.
* webfm_dbinsert_file() failed
Any ideas about what's happening?
Comments
Comment #1
heggaton commentedExactly the same problem I'm having. PHP5 IIS.
I've spent a day tracking the issue down and the only thing I've discovered with the default directory (not the FTP dir) is:
I upload a file called access.png.
The file is uploaded into the temp dir and the system attempts to copy the file from the temp to the default dir. This is where it fails - even though the PHP copy function returns a successful flag.
More importantly I can get it to (partially) succeed. If I hard code the file name in (at the copy function in file.inc [approx line 373]) to anything *other* than the original file name it works! In this case hard coding "access.png" fails but "foo.png" works. The actual database insert still fails however.
This applies to all uploaded files.
Comment #2
robmilne commentedThe dev version has fixed this. Release 1.6 will make it official.
Add this to appropriate place in function webfm_dbinsert_file of webfm.module:
$metadata['fdesc'] = '';Mysql+Apache doesn't need this for some reason.
Comment #3
heggaton commentedDOH! I spent an entire day yesterday and it came down to that!?
Thanks for providing a fix. It's now working :)
Comment #4
charly commentedComment #5
(not verified) commented