bugphpGroupWare - Bugs: bug #5595, Send class in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #5595: Send class in /phpgwapi/inc/class.send.inc.php fails if sent a large file.

Submitted by:  None
Submitted on:  Sat 27 Sep 2003 01:39:41 PM UTC  
 
Item Group: 0.9.14.004/5/6 releaseCategory: API - phpGroupware API
Severity: 3 - NormalPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: SVNOperating System: GNU/Linux - Debian
Reproducibility: Every TimePlanned Release: None
Fixed Release: 

Sat 27 Sep 2003 10:02:56 PM UTC, comment #1:

I will include a fix for this in 16, 14 will be superceeded by the end of October. If you really need it in 14, just check out that class from cvs or gab the RC2 tarball and use it.

Dave Hall <skwashd>
Project Administrator
Sat 27 Sep 2003 01:39:41 PM UTC, original submission:

>I have run into a problem with sending emails that have large
>attachments (about 1MB+) using the class 'send'. I am currently able
>to add attachments to an event (see below for previous discussion from
>phpgroupware-users), but when files get to the size of around 1MB, I
>either timeout or memory is exceeded. I have upped the memory in
>php.ini to 20MB, with a timeout of 300seconds and things work fine.
>However, with only 100 seconds it timesout. I have tracked down the
>problem to the following function in /phpgwapi/inc/class.send.inc.php:
>
> function put2socket($socket,$message)
>
>It hangs in the 'do' loop b/c the file is so large. To give you an
>idea of what the $message contains: it has the standard event
>notification message, along with the appropriate Mime headers, and the
>attached file encoded using the following:
>chunk_split(base64_encode($file). I know my code is working b/c of
>being able to send multiple smaller attachments, as well as being able
>to send the larger ones by editing the php.ini file. However, I don't
>think I should have to edit the php.ini file to send a file that is
>only 1MB.


>I am using the following:
>phpGW: 0.9.14.508
>php: 4.2.3
>apache: Apache/1.3.27 (Unix) Debian GNU/Linux


I do not use the email app, but I am quite certain it is not the mail server I use, since I can use other email clients and send very large files. I am not using apache2, so I don't think that is the problem. Since I am able to get the larger attachments sent when changing the php.ini memory and max timeout...it leads me to believe that it is phpgw and not my server.

Just for debugging purposes, I noticed that when sending the 1MB file it went through the 'do' loop 17,151 times!!! I'm pretty sure that is why things are timing out or using to much memory.

P.s. just a quick look at the email app, and I see that it does not seem to use the same 'send' class as the calendar app.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by skwashd (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 06 Mar 2010 02:24:50 AM UTCskwashdAssigned toskwashd=>None
    Tue 20 Jan 2004 12:17:07 PM UTCpowerstatCategoryNone=>API - phpGroupware API
    Sat 27 Sep 2003 10:02:56 PM UTCskwashdAssigned toNone=>NA

    Back to the top


    Powered by Savane 3.1-cleanup1