[imp] Re : attachments_size warning with too big attachments

Xavier Poirier xpoirier@ch-bourg01.fr
Tue, 22 May 2001 17:00:12 +0200


added before (line 915 for me) :

$total_size = 0;
        for ($i = 0; $i < count($attachments_size); $i++) {
            $total_size += $attachments_size[$i];
        }

Objet: Re: [imp] Re : attachments_size warning with too big
attachments


> Can you tell me please, where in compose.php3 should I put this
code as it
> can work for me too ?
>
>     Thanks
>
>     Darci Tartari
>
> Xavier Poirier gravada:
>
> > Hi all,
> >
> > Sorry it was a PHP question !
> > I have found the solution :
> >
> > added in compose.php3 this code :
> >
> > if ($file_upload_size == 0) {
> >    echo '<script language="JavaScript">alert("'.
$file_upload_name . ' à
> > une taille supérieure à 4194304 Octets\n Limite du fichier' .
> > addslashes(imap_last_error()) . '");</script>';
> >      break;
> >    }
> >
> > PHP return the value zero (' 0') when the file exceded the
variable name
> > max_upload_size in http.conf (it's in php mailing list)
> >
> > Now it alert the user when a user try to attach a file whitch
is too BIG
> > !
> >
> > thanks
> >
>
> ---------------------------------------------------------------
---------
>
> ---------------------------------------------------------------
-----
> > the question was :
> >
> > text format (sorry)
> >
> > Hi all,
> >
> > I have this when I try to attach a file who have the MAX
indicated in
> > the variable upload_max_filesize in httpd.conf :
> >
> > WHY ?
> > Warning: Undefined variable: attachments_size in
> > /var/www/html/horde/imp/compose.php3 on line 919
> >
> > is it impossible to trap this error and show a message more
> > comprehensible for the user ?
> >
> > thanks.
> >
> >
>
>
> --
> IMP mailing list: http://horde.org/imp/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org