6.0.0-beta1
11/9/25

[#2539] windows : attachment form missing
Summary windows : attachment form missing
Queue IMP
Queue Version 4.0.3
Type Bug
State Not A Bug
Priority 2. Medium
Owners
Requester fabrice (at) gmail (dot) com
Created 08/31/2005 (7375 days ago)
Due
Updated 11/28/2005 (7286 days ago)
Assigned 08/31/2005 (7375 days ago)
Resolved 11/28/2005 (7286 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/28/2005 02:47:37 PM Jan Schneider Comment #5
State ⇒ Not A Bug
Reply to this comment
No feedback.
10/21/2005 04:34:00 PM Jan Schneider Comment #4 Reply to this comment
And what does

ini_get('upload_tmp_dir')

exactly return? Really the directory being used for file uploads?
09/06/2005 10:57:10 AM fabrice (at) gmail (dot) com Comment #3 Reply to this comment
Are you *sure* the directory is really writable :
Yes I am. This directory is already used by this PHP engine to upload 
files for other applications and write sessions files.
(i.e., do attachments _work_ now?)
Yes, it does :)
and that is_writable is the culprit?
Once this part of the code tagged as a comment, the attachment form 
appears in the composing window et attachments DOES work.


08/31/2005 08:38:07 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
The only note in the PHP documentation about is_writable and Windows 
says that it incorrectly returns writable - the exact opposite of what 
you describe. Are you *sure* the directory is really writable (i.e., 
do attachments _work_ now?), and that is_writable is the culprit?
08/31/2005 04:15:05 PM fabrice (at) gmail (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ windows : attachment form missing
Queue ⇒ IMP
Reply to this comment
Hi,

I've proceeded to the installation of Horde 3.0.5 + Imp 4.0.3 under 
WS2003 + IIS 6.0 + PHP 4.3.11 (CGI mode) and found an error concerning 
attachment when composing a new message. No upload form / attachment 
area was shown in the pop-up composing window.



Upload directive and writing in temp dir were fine.



When looking in the /lib/Horde/Browser.php file, I saw a call to 
is_writable() function (in allowFileUploads() around lines 795 to 
798). Under Windows this function doesn't tell wether the directory is 
writable or not (cf. php documentation).



As a quick (and very ugly) fix I commented this section :

if (($dir = ini_get('upload_tmp_dir')) &&

                 !is_writable($dir)) {

                 return 0;

and the attachment area came back in my browser :)



Hope this will help.



Regards,

Fabrice


Saved Queries