[imp] Re : attachments_size warning with too big attachments

Darci Tartari dtartari@portoriogrande.com.br
Tue, 22 May 2001 10:33:05 +0100


 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.
>
>