Author Topic: Issue uploading file attachments..  (Read 25440 times)

Offline Mojoski

  • Newbie
  • *
  • Posts: 4
Issue uploading file attachments..
« on: September 17, 2007, 01:53:32 PM »
ok, so I am having one small issue, it seems..

When I try to send an email with a rather large attachment (7MB), I get the following error in my apache log file:

Code: [Select]
[Mon Sep 17 12:48:24 2007] [error] [client XXX.XXX.XXX.XXX] File does not exist: /usr/local/roundcubemail-0.1-rc1/&_action=keep-alive&_t=1190050180412&_remote=1, referer: [url]http://www.domain-name.com/RoundCube/?_task=mail&_action=upload[/url]
It does seem to upload, though. The list of attachments updates.

But then when I try to send the email, it sits for a while with the spinning "Sending Message..." alert, but then the alert just disappears and the message never sends..

Thoughts?

I'm using the following Alias directive in my Apache conf file:

Code: [Select]
 Alias /RoundCube/ /usr/local/roundcubemail-0.1-rc1/
Could that be part of the problem?

Thanks for any suggestions or input!

Mojoski

Offline danellison

  • Newbie
  • *
  • Posts: 4
Re: Issue uploading file attachments..
« Reply #1 on: September 17, 2007, 05:05:33 PM »
me2 :-[

My php.ini file is set to allow uploads of up to 20M, exim also set to allow maximum file size of 20M. Attach 4M file and nothing seems to happen after the file is uploaded. roundcube returns to the message as if you hadn't clicked on the "send now" button. Any ideas what can be causing this?

Dan Ellison
Concepte of Illinois

Offline Mojoski

  • Newbie
  • *
  • Posts: 4
Re: Issue uploading file attachments..
« Reply #2 on: September 17, 2007, 05:19:37 PM »
Yep, that is exactly the same thing I am seeing as well.. Are you getting the same error in your webserver error log??

Thanks!


Offline danellison

  • Newbie
  • *
  • Posts: 4
Re: Issue uploading file attachments..
« Reply #3 on: September 17, 2007, 05:49:44 PM »
My error log contains the following message after trying to send 5.9 M attachment using roundcube mailer:

[Mon Sep 17 16:43:35 2007] [error] [client 204.94.237.17] File does not exist: /var/www/html/roundcube/&_action=keep-alive&_t=1190064573906&_remote=1, referer: http://ceillinois.com/roundcube/?_task=mail&_action=upload

I have further verified the following issues pointed out in previous posts related to this issue:

 php.ini setting are set to allow maximum memory size of 20M, maximum file upload size of 20M, file uploads are on.

 .htaccess in roundcube home directory set upload_max_filesize 20M,

 exim.conf message_size_limit 20M

 Send attachment (5.9M) using Outlook Express without issue,
 Send attachment (5.9M) using Squirrelmail without issue.

It would seem that my system is configured correctly since two other mailers are working fine. Anybody got a solution for this one? Much appreciated.

Dan Ellison
Concepte of Illinois

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,566
    • http://SKaero.com/
Re: Issue uploading file attachments..
« Reply #4 on: September 17, 2007, 07:23:20 PM »
You may have a slow sever whats your max php script execution time limit?

Offline danellison

  • Newbie
  • *
  • Posts: 4
Re: Issue uploading file attachments..
« Reply #5 on: September 18, 2007, 09:40:32 AM »
Thanks for the reply SKaero. I appreciate your time and effort. The server is a dual xeon 2.4 Ghz Dell with a load average of 0.04 or less most of the time. Lack of processor power would surprise me greatly though I am ruling out nothing at this point ;)

max_execution_time in php.ini is set to 60 seconds and I have overriden that value in roundcube's .htaccess file with:

php_value  max_execution_time 150

I have noticed that it seems to be right at 30 seconds that the process fails but would expect the above noted changes to have had an impact on that observation.... Wierd.

Regards,
Dan Ellison
Concepte of Illinois

Offline dano

  • Full Member
  • ***
  • Posts: 124
Re: Issue uploading file attachments..
« Reply #6 on: September 18, 2007, 11:51:44 AM »
Are you able to send smaller attachments with no problems? Check permissions on the temp folder if not.

Also in the index.php there is this
Code: [Select]
// increase maximum execution time for php scripts
// (does not work in safe mode)
if (!ini_get('safe_mode')) @set_time_limit(120);

I don't know if that could be the problem but it's worth a look eh?

Hope that helps

Offline danellison

  • Newbie
  • *
  • Posts: 4
Re: Issue uploading file attachments..
« Reply #7 on: September 18, 2007, 01:18:08 PM »
Good idea SK but didn't seem to make any difference changing the timeout value inside index.php....

Smaller attachments do get delivered just fine and as I pointed out in my initial post, Outlook Express and more importantly, squirrelmail both process the attachments without problem. Agravating heh?

Thanks again and keep trying - I;ll keep checking 8)

Regards,
Dan Ellison
Concepte of Illinois

Offline hshn

  • Newbie
  • *
  • Posts: 6
Re: Issue uploading file attachments..
« Reply #8 on: October 25, 2007, 09:07:43 AM »
Hello,

I have exactly the same problem. Smaller attachments do get delivered just fine, but with greater attachments (say 1MB and greater) nothing happens. With Thunderbird, Outlook a.s.o. there's no problem to send e-mails with greater attachments.

When I try to send the email, it sits for a while with the spinning "Sending Message..." alert, but then the alert just disappears and the message never sends..

I have changed the .htaccess to this (overloaded) values:

Code: [Select]
<IfModule mod_php5.c>
 php_flag   display_errors Off
 php_flag   log_errors   On
 php_value   error_log    logs/errors
 php_value   upload_max_filesize   10M
 php_value   post_max_size  20M
 php_value   memory_limit  256M
 php_value   max_execution_time   300
</IfModule>


This is very strange, the same happens with rc2.

Any ideas?

Heidrun

Offline driggs

  • Newbie
  • *
  • Posts: 4
Re: Issue uploading file attachments..
« Reply #9 on: November 01, 2007, 12:42:44 PM »
This is a serious issue, I've tried all the PHP configuration settings above and still can't get large attachments to "show up" in RoundCube RC1, while smaller attachments "show up" and send without issue.

Other mail clients send and receive large attachments through my SMTP/IMAP server without issue.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,328
Re: Issue uploading file attachments..
« Reply #10 on: November 01, 2007, 12:55:43 PM »
Quote
When I try to send the email, it sits for a while with the spinning "Sending Message..." alert, but then the alert just disappears and the message never sends..
check your error log. i think you will see an out of memory error like this http://roundcubeforum.net/forum/index.php?topic=1811.0
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline hshn

  • Newbie
  • *
  • Posts: 6
Re: Issue uploading file attachments..
« Reply #11 on: November 12, 2007, 10:31:49 AM »
I have made a sensational discovery (:-):

With Firefox there's no problem to send emails with greater attachments. The upload is very big, the max_execution_time from 120s is sufficient. The problem happens in my environment only with Opera 9.22. With Opera it's not possible to upload attachments greater than (apr.) 200K. Its mysterious! The same OS on client-side, the same mailserver, the same preferences in both browsers (esp. proxy server) ...


Here is my .htaccess:
Code: [Select]
<IfModule mod_php5.c>
 php_flag   display_errors Off
 php_flag   log_errors   On
 php_value   error_log    logs/errors
 php_value   upload_max_filesize   10M
 php_value   post_max_size  20M
 php_value   memory_limit  256M
 php_value   max_execution_time   120
</IfModule>

Best regards,
Heidrun

Offline fqa

  • Newbie
  • *
  • Posts: 1
Re: Issue uploading file attachments..
« Reply #12 on: November 25, 2007, 03:51:12 AM »
here is my input:

i've been struggling with the same problems the last day and at last took the time to read all the error logs.

I'm using WinXPSP2x64, Opera9.23, RC-0.1RC-2, hMailServer, Apache2.2.4/php5.2.4, MySql5

php memory exhaust etc. is solved by editing in php.ini and .htaccess-files (plural!) AND the mailserver settings!;

things i checked:
first off, roundcube\config\db.inc.php, main.inc.php
 $rcmail_config['db_max_length'] = 81920000; (dont actually know how much this helps with basic settings...)
 $rcmail_config['debug_level'] = 4;  (good for debugging!)
 $rcmail_config['enable_caching'] = FALSE;
 $rcmail_config['default_host'] = '';
 $rcmail_config['default_port'] = 143;
 $rcmail_config['username_domain'] = '';
 $rcmail_config['smtp_server'] = '';
 $rcmail_config['smtp_port'] = 25;
 $rcmail_config['smtp_user'] = '%u';
 $rcmail_config['smtp_pass'] = '%p';
 $rcmail_config['smtp_auth_type'] = '';     (leave empty!!)
 $rcmail_config['session_lifetime'] = 10;
 $rcmail_config['des_key'] = 'rc.rc-2!24ByteDESkey*Str';

php.ini
 safe_mode = Off
 file_uploads = On
 upload_tmp_dir = ""
 upload_max_filesize = 128M
 error_reporting = E_ALL  (good for debugging!)
 post_max_size = 32M
 extension=php_imap.dll
 extension=php_openssl.dll
 SMTP =
 smtp_port = 25
 sendmail_from =
 sql.safe_mode = Off
 session.save_path = ""  (unsure of this one)
 max_execution_time = 600
 max_input_time = 600
 memory_limit = 128M

roundcube\.htaccess
AddType text/x-component .htc
 
  php_flag   display_errors   Off
  php_flag   log_errors   On
  php_value   error_log   logs/errors
  php_value   upload_max_filesize   128M
  php_value   post_max_size   32M
  php_value   memory_limit   128M
 

 
  php_flag   display_errors   Off
  php_flag   log_errors   On
  php_value   error_log   logs/errors
  php_value   upload_max_filesize   128M
  php_value   post_max_size   32M
  php_value   memory_limit   128M
 

 
  Order allow,deny
  Deny from all
 

 Order deny,allow
 Allow from all

roundcube\logs\.htaccess, roundcube\temp\.htaccess
 Order allow,deny
 Allow from all           (dangerous?)

hMailServer Administraror: Domain\\Limits
 Maximum Size: 1000 MB
 Maximum Message Size: 64000KB
 Maximum Account Size: 100MB
hMailServer Administraror: Settings\TCP/IP Ports
 SMTP: 25
 IMAP: 143
hMailServer Administraror: Settings\Protocols\SMTP\Delivery of e-mail
 hostname:
 SMTP Relayer:  (often isp wont allow client to send mail directly)
  +authentication if required...

 another way is ofcourse to let php send mail via isp and not through local smtphost - but not fun! :)
 that is done by setting the smtp host in php.ini
 --this is ofcourse the only way if you dont have your own smtp server
 


there... excuse the overkill, but it's time you guys solved this and to illustrate the various settings that might cause the "unexplained" behavior. for example, even if your htaccess and php.ini says it's ok, your mail server might not allow large files. READ YOUR LOGS!

i have excluded the sql settings to somewhat limit this post size, and it doesnt seem to be an issue for anyone here...

cheers!