在 Centos 5.6 上使用 PHP 5.2.17 运行 ClamAV 时出现问题
我在 Centos 5.6 上使用 php-clamav 包从 PHP 使用 ClamAV 时遇到一些问题,我想知道是否有人能够解释设置?
安装 ClamAV(和 clamav-devel)似乎一切顺利,并且 freshclam 命令给了我一些令人鼓舞的输出。添加 php-clamav 似乎也进展顺利。将 extension=clamav.so 添加到我的 php.ini 文件中会向 phpinfo() 的输出添加一个 clamav 部分。然后我创建了一个 /etc/php.d/clamav.ini ,如下所示:
[clamav]
clamav.dbpath="/var/clamav"
clamav.maxreclevel=16
clamav.maxfiles=10000
clamav.maxfilesize=26214400
clamav.maxscansize=104857600
clamav.keeptmp=0
clamav.tmpdir="/tmp"
/var/clamav 是可以找到文件 bytecode.cvd、daily.cld、main.cvd abdmirrors.dat 的位置,我认为这就是文件它在寻找什么?
重新启动 Apache 会导致这些详细信息显示在 phpinfo() 中,但只是我第一次尝试。对该函数的后续调用不会产生任何结果。此外,对 cl_info() 的调用始终显示 ClamAV 版本,但“已加载 0 个病毒签名”。
我觉得我非常接近...任何帮助将不胜感激!
托比
I'm having some issues using ClamAV from PHP using the php-clamav package on Centos 5.6, I am wondering if anyone might be able to shed any light on setup?
Installing ClamAV (and clamav-devel) seemed to go ok, and the freshclam command gives me some encouraging looking output. Adding php-clamav also seemed to go fine. Adding extension=clamav.so to my php.ini file adds a clamav section to the output from phpinfo(). I then created a /etc/php.d/clamav.ini that looks like this:
[clamav]
clamav.dbpath="/var/clamav"
clamav.maxreclevel=16
clamav.maxfiles=10000
clamav.maxfilesize=26214400
clamav.maxscansize=104857600
clamav.keeptmp=0
clamav.tmpdir="/tmp"
/var/clamav is where the files bytecode.cvd, daily.cld, main.cvd abd mirrors.dat can be found, I assume that's what it's looking for?
Restarting Apache causes these details to display in phpinfo(), but only the first time I try. Subsequent calls to that function do not produce anything. Additionally, calls to cl_info() always show the ClamAV version but "0 virus signatures loaded".
I feel like I'm very close...any help would be much appreciated!
Toby
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然迟来了,但为了以防万一它对任何人有帮助,在作者 (php-clamav) 的建议下,我从 SVN 存储库制作了一个新版本,它解决了这个问题。我相信作者已经发布了基于相同代码的新版本。
Belatedly, but in case it helps anyone, at the author's (php-clamav) suggestion I made a new version from the SVN repo, which fixed the issue. I believe the author has since released a new version based on the same code.