Hi All,
Somehow it is my open_basedir restriction.
Played around with the upload_tmp_dir and adding /tmp/ to the open_basedir, but no luck at all. Checked that they were in effect with (info). open_basedir /usr/local/www/roundcube/:/tmp/ upload_max_filesize 2M upload_tmp_dir /usr/local/www/roundcube/temp/upload/
Even though upload_tmp_dir is set I still see a file with size 0 owned by www created in /tmp at the time I do the POST
Anyone, please.....
Tearing my hair out by now (not that there's much left :D)
Kind regards,
Spil.
On 29/05/07, Spil Oss spil.oss@googlemail.com wrote:
Just noticed something....
In my roundcube's temp/ directory, a file is created starting with rcmAttmnt, size remains 0 bytes. Looking at the http-headers transmitted when uploading a readable file, the file POST get's a an OK 200 response.
POST /?_task=mail&_action=upload HTTP/1.1 Host: mail.example.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: https://mail.example.com/?_task=mail&_action=compose Cookie: language=en; sessid=abababababab1a7ff97435cbef6f377e Content-Type: multipart/form-data; boundary=---------------------------10481152316432 Content-Length: 4652 -----------------------------10481152316432 Content-Disposition: form-data; name="_attachments[]"; filename="benchmark.txt" Content-Type: text/plain
<snip>
-----------------------------10481152316432--
HTTP/1.x 200 OK Date: Tue, 29 May 2007 19:59:03 GMT Server: Apache Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Length: 728 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=UTF-8
GET /&_action=keep-alive&_t=1180468768140&_remote=1 HTTP/1.1 Host: mail.example.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: https://mail.example.com/?_task=mail&_action=upload Cookie: language=en; sessid=ababababa15c1a7ff97435cbef6f377e
HTTP/1.x 404 Not Found Date: Tue, 29 May 2007 19:59:24 GMT Server: Apache Vary: accept-language,accept-charset Accept-Ranges: bytes Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 Content-Language: en
On 29/05/07, Spil Oss spil.oss@googlemail.com wrote:
Hi All,
Hoped that the rc1 would help, but it doesn't. Checked the settings in the config and the directory itself and they're both OK
grep temp /usr/local/www/roundcube/config/main.inc.php // use this folder to store temp files (must be writebale for apache user) $rcmail_config['temp_dir'] = 'temp/';
ls -ld /usr/local/www/roundcube/temp drwxr-xr-x 2 www www 512 May 29 21:34 /usr/local/www/roundcube/temp
Apache is writing the sessions to the temp directory correctly, so everything seems OK.
Increased error_reporting to E_ALL and this is the only error I get, seems to start after I start composing a new message. May 29 21:47:45 2007] [error] [client 172.17.2.167] File does not exist: /usr/local/www/roundcube/&_action=keep-alive&_t=1180465781253&_remote=1, referer: https://mail.example.com/?_task=mail&_action=upload
Any possibilities of generating more trace information?
Kind regards,
Spil.
On 02/04/07, Thomas Bruederli roundcube@gmail.com wrote:
Make sure that the webserver has write-access to that temp folder. RoundCube uses the move_uploaded_file() to store the files which obviously fails. You also have the possibility to set another directory for temp files. Open config/main.inc.php and search for 'temp'.
~Thomas
2007/3/29, Spil Oss spil.oss@googlemail.com:
Hi all,
When composing a message, I cannot add an attachment (tried both FF2 and IE6). After clicking the upload button, I get "File upload failed"
FreeBSD 6.2 Apache 2.2.4 (from ports) PHP 5.2.1_3 (from ports) suhosin 0.9.6.2 eaccelerator (from ports) v0.9.5 roundcube-0.1.20070303 (from ports)
Checked an earlier build and that behaved the same. I have an open_basedir restriction set to the installation path of roundcube (/usr/local/www/roundcube) It seems that roundcube tries to store the file in /usr/local/www/roundcube/temp which is allowed under the open_basedir Switching eaccelerator off doesn't help.
No entries in apache error log for the failure, nor anything to be found in roundcube's logs. (even if setting debug to level 8)
Any clues, pointers, help appreciated greatly!
Kind regards,
Spil.