Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hey guys,
This is very troubling!
Jeff: did your host get back to you regarding the blank upload_tmp_dir. Did setting that value allow uploads to work properly?
Doug: So I just did a few tests on a number of my own installations - some brand new 2.1.4 installations, some upgraded from earlier releases - but didn't encounter any problems. I also checked over what's recently changed in the Core + in the module, but again can't see anything that could be the cause. But the fact that you're not getting any sort of error when uploading it through your FT installation is pretty darn odd. It should tell you *something*...
One option would be to uninstall, then re-install the module - but honestly, it's a total pain... if you remove the field type, all file upload fields are reset to textboxes, so after you re-install it you'd need to reconfigure everything. So let's scratch that option for now.
Would you mind confirming that the hooks are still defined for the module? Check your ft_hook_calls table. This query (you may need to tweak the DB table prefix) should return 6 results.
Code: SELECT * FROM `ft_hook_calls` WHERE module_folder = 'field_type_file'
Doug, I know I can't access your installation - so Jeff, if you're still having trouble, please let me know and I'll take another look.
- Ben
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Oct 17th, 2011, 9:04 PM
(This post was last modified: Oct 17th, 2011, 9:08 PM by Ben.)
(Oct 17th, 2011, 8:46 PM)dethompsOWU Wrote: What is the "upload_tmp_dir"? On my FormTools installation, there's an "upload" directory, but that's it...maybe I'm missing that other directory or something?
That's a php.ini setting. It defines the temporary file upload folder for file uploads; it needs to be a valid, writable folder in order for file uploads to work. See:
http://www.php.net/manual/en/ini.core.ph...ad-tmp-dir
[EDIT: It seems unlikely that that would be the cause on your installation though... a little too coincidental. But to check, create a PHP file with phpinfo(); in it and look for that value.]
- Ben
Posts: 41
Threads: 15
Joined: Jul 2009
Reputation:
0
I think we may be zeroing in on a culprit...
I checked the database and there are six results from the query you provided, so that checks out.
I then tried the phpInfo thing, and upload_tmp_dir is set to "no value". My guess is it has never been set to a value.
Since we haven't used the form that has the file upload field since October 2010, if something changed with the way FormTools deals with file uploading (so that it now requires the upload_tmp_dir to be set to something) at any time in the past year, there's a really good chance that this has actually been a problem for a while now and I just haven't noticed it because this is the only form on our site that does the file upload thing...
FYI, I also tried the uninstall/delete/reinstall technique on the File Upload module (and reset the affected file upload field's type per your instructions), but that had no effect...adding a file to a new/existing submission from the back-end still results in nothing happening...no errors or anything.
Posts: 41
Threads: 15
Joined: Jul 2009
Reputation:
0
I also just tried two more things:
1. Putting something in the php.ini for upload_tmp_dir, restarting Apache, and trying to upload a file via the FormTools back-end. No difference...there's a pause, it says the file was uploaded successfully, but there's nothing in the File field box in the back-end, there is no change on the server in either the upload_tmp_dir I specified or FormTools' upload directory, there are no errors, etc.
2. Creating a new Internal form from scratch within the FormTools back-end with only one file field. Again, when I went to upload a file via the back-end, it seems to work but nothing happens anywhere...no errors or anything.
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hi Doug,
Curious... I wasn't aware file uploads *could* work without the upload_tmp_dir. Does the folder have full write permissions?
Tell you what, I'll whip up a simple standalone file upload PHP script now that you can test. If that works, it will at least eliminate the server/PHP config as the cause.
But I'm virtually positive nothing changed in the code that would suddenly rely on the upload_tmp_dir being set or not.
I'll post back shortly.
- Ben
Posts: 41
Threads: 15
Joined: Jul 2009
Reputation:
0
According to what I was able to determine, if the upload_tmp_dir parameter is left undeclared in the php.ini, then PHP defaults to the "system temp directory" (whatever/wherever that is) instead.
I'm off to a meeting in a couple minutes, so it'll be after that before I can revisit this issue any further.
Thanks,
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hi Doug,
Yes, you're absolutely right - I was mistaken. So that's not the cause. Sorry for the wild goose chase.
But this is also good, in that whatever happened is likely happening to Jeff as well. I just spoke to him and I'm going to continue debugging on his system.
I'll post back when I figure something out.
- Ben
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hi Doug,
Sorry this is taking so long to identify; it's kind of a sticky one.
But I am getting to the bottom of it on Jeff's installation. Two things:
1. If you haven't already done so, would you mind running the Database Integrity module? My hunch is you'll find a problem ft_hook_calls Core table.
2. When did you originally install Form Tools 2? Also, do you recall whether it was a 2.0.0 beta version?
Also, I found the same problem you encountered with the Export Manager module. That was caused by a failed upgrade - either the upgrade code simply failed to execute, or the code was faulty. I'm going to keep digging.
- Ben
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Okay, it's fixed for Jeff now. Let me know about the Database Integrity module results - hopefully it's the same problem on your system.
- Ben
Posts: 41
Threads: 15
Joined: Jul 2009
Reputation:
0
Had to leave for the day. Will try tomorrow a.m. Fingers crossed it's the same problem. I'll keep you posted.
Thanks for all your help,
|