[horde] clamav hook

Nicolás Valera nvalera at gmail.com
Thu Nov 29 10:33:41 UTC 2012


On 11/28/2012 06:30 PM, Michael M Slusarz wrote:
> Quoting Nicolás Valera <nvalera at gmail.com>:
>
>> (mod_fastcgi.c.2701) FastCGI-stderr: PHP Parse error:  syntax error,
>> unexpected T_STRING, expecting T_FUNCTION in
>> /var/www/horde/imp/config/hooks.php
>
> Your local hook is not correct.  The PHP syntax is invalid.
>
> michael
>
> ___________________________________
> Michael Slusarz [slusarz at horde.org]
>

Michael, thanks for the answer!

Well, i did a fresh installation and i just uncomment the lines for clam 
in the hooks.php and then the error I get is the following:

2012-11-29 07:28:15: (mod_fastcgi.c.2701) FastCGI-stderr: PHP Fatal 
error:  Only variables can be passed by reference in 
/var/www/imp/config/hooks.php on line 189

uncommented lines are the following:

-------------------------------------------------------------------------
         $clamscan = '/usr/bin/clamscan';
         exec($clamscan . ' --quiet ' . escapeshellarg($tempfile), null, 
$return_var);
         switch ($return_var) {
         case 1:
             // Virus found.
             throw IMP_Compose_Exception::createAndLog('INFO', 'Virus 
found in uploaded attachment. Attachment will not be added to the 
compose message.');

         case 2:
             // Error occurred.
             Horde::log('Unknown error when scanning message for 
virus.', 'INFO');
             break;
         }

         return $type;
     }

-------------------------------------------------------------------------
Regards!


More information about the horde mailing list