[horde] traces in apache error_log about impattxxx for file_get_contents and Compose.php

LALOT Dominique dom.lalot at gmail.com
Wed Aug 19 08:41:35 UTC 2009


Hello,

I get sometimes some strange errors about Compose.php

[Wed Aug 19 09:06:51 2009] [error] [client xx.yy.132.65] PHP Warning:
file_get_contents(/var/www/tmp/impattENmtBR)
 [<a href='function.file-get-contents'>function.file-get-contents</a>]:
failed to open stream: Aucun fichier ou r\xc3\xa9pertoire de ce type in
/var/www/perso/horde-webmail-1.2.2/imp/lib/Compose.php on line 2309,
referer: http://xx/horde/dimp/compose.php?folder=INBOX&uid=1997&type=forward_all

horde is 3.3.4
imp 4.3.4

There is no other warning elsewhere. Despite, I have a file vfs
driver, it's using my temp directory /var/www/tmp
So I looked if I had no cleanup scripts.
In one case I was able to relate to a user which logged just a few
minutes before that trace.

When I look at the mail sent, I can see:

--=_o15wbq7q0ls
Content-Type: message/rfc822;
 name*="utf-8''Message%20transf%C3%A9r%C3%A9%C2%A0%3A%20envoi%20photos%201"


--=_o15wbq7q0ls--

So, that person was trying to forward photos, but they arrived empty
which is logic, as file_get_contents failed.
I noticed that there was no check on the return data, so no warnings
for the sending user to say:
Oh, I can't find your data.. and abort sending ..

I have several failures a day.

Have you any ideas about what could be the problem and how to trace it?

The piece of code (line 3207) in Compose.php is:
        $filename = $part->getInformation('temp_filename');
        if ($part->getInformation('temp_filetype') == 'vfs') {
            require_once 'VFS.php';
            $vfs = &VFS::singleton($conf['vfs']['type'],
Horde::getDriverConfig('vfs', $conf['vfs']['type']));
            $data = $vfs->read(IMP_VFS_ATTACH_PATH, $filename);
        } else {
#            if($data=file_get_contents($filename) ===false)
#              Horde::logMessage("Pb attachement $filename", __FILE__,
__LINE__, PEAR_LOG_ERR);
            $data=file_get_contents($filename);
            if ($data===false)
               Horde::logMessage("tracedom attachement Pb sur
$filename", __FILE__, __LINE__, PEAR_LOG_ERR);
        }


Thanks

Dom




-- 
Dominique LALOT
Ingénieur Systèmes et Réseaux
http://annuaire.univmed.fr/showuser.php?uid=lalot


More information about the horde mailing list