6.0.0-RC7
6/23/26

[#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 8/31/05 (7601 days ago)
Due
Updated 11/28/05 (7512 days ago)
Assigned 8/31/05 (7601 days ago)
Resolved 11/28/05 (7512 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
372 Jan Schneider Comment #5
State ⇒ Not A Bug
Reply to this comment
No feedback.
04 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?
1010 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.


78 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?
54 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