Closed david-vde closed 5 years ago
I need more information for this issue. Do you loop through the uploaded files using scanFile
on each?
Or can you create an example to recreate this error behaviour or create a failing functional/integration test?
Hello
This is working without errors :
$socket = (new \Socket\Raw\Factory())->createClient('unix:///***/clamd.ctl');
$quahog = new \Xenolope\Quahog\Client($socket, 30, PHP_NORMAL_READ);
$result = $quahog->scanFile(__DIR__.'/test.jpg');
This is NOT working, it fail when calling the second scanFile method (the both files exists):
$socket = (new \Socket\Raw\Factory())->createClient('unix:///***/clamd.ctl');
$quahog = new \Xenolope\Quahog\Client($socket, 30, PHP_NORMAL_READ);
$result = $quahog->scanFile(__DIR__.'/test.jpg');
$result = $quahog->scanFile(__DIR__.'/test2.jpg');
And this works too :
$socket = (new \Socket\Raw\Factory())->createClient('unix:///***/clamd.ctl');
$quahog = new \Xenolope\Quahog\Client($socket, 30, PHP_NORMAL_READ);
$result = $quahog->scanFile(__DIR__.'/test2.jpg');
So this is not even related to the fact that the files are uploaded or not.
Thank you very much for your help
Doh.. Ok I got it.... I have to start a session using startSession
Indeed haha
I once told a colleague that I offer RaaS.
Hello
When I'm trying to check multiple uploaded files, the first one is scanned correctly but the second one give me an error :
PHP Warning: socket_last_error(): supplied resource is not a valid Socket resource in /***/vendor/clue/socket-raw/src/Exception.php on line 21
I also tried to check 2 times the same file and the second time I check it same error.
Looks like I can use clamav only on one file at time... why?
I'm using scanFile method
I can't use multiScanfile method as I don't want to scan a whole dir....
any idea?