[imp] Problems with attachments

Chris Crowley ccrowley@tulane.edu
Wed, 15 Nov 2000 13:15:38 -0600


Per an archive entry:

>
> Warning: Unable to open '/tmp/phpaDa4nO' for reading: No such file or
> directory in
> /space/local/apache_php/htdocs/horde/imp/compose.php3 on line 910
>


I had the same trouble after upgrading from 2.2.0-pre13 to 2.2.2
(Apache 1.3.12, PHP 3.0.16., OS NetBSD-1.4.2).
I solved the problem by modifying the function tmpdir() in imp/compose.php3.
<SNIP>
/*
 * Return the value of upload_tmp_dir, or default to '/var/tmp'
 */
function tmpdir()
{
    $tmp = get_cfg_var('upload_tmp_dir');
    if (empty($tmp)) {
 $tmp = getenv('TMPDIR');
    }
    return (empty($tmp) ? '/var/tmp' : $tmp);
}

</SNIP>

Hope this may help someone else, too.

Chris