[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 09:21:54 UTC 2009


Humm..

Looking a little bit further, I discovered that the temp file was not
written on the good server!

I have to explain that horde is load balanced through apache2.2
mod_proxy_balancer and mod_rewrite (to add a cookie with the route).
I noticed some problems with directory redirections not working properly as
the real host was used instead of the load balanced host. So the cookie was
not sent.

In my conf.php, server name points to the load balancer:

$conf['server']['name'] = 'horde.univ.fr';
if somewhere, the real host given by apache is used, that can explain why,
the temp file is created on a random server, then read on the good server,
but unreachable..

Dom

2009/8/19 LALOT Dominique <dom.lalot at gmail.com>

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



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


More information about the horde mailing list