Last modified: 2009-10-14 22:25:42 UTC
Created attachment 6668 [details] Fixed uploadbase.php As you may or may not know, using an antivirus program on windows currently does not work because of the way the php code is implemented, it uses a method of capturing the $errorcode$ in a method incompatible with windows. Although there was a note that someone had found a 50 line work around to make it work. I contacted him, copied in his code, and now clamscan is tested and working on windows server 2008 r2. Is it possible to replace the old uploadbase.php in the svn with this one so that all future users will have this option.
Michael, want to take a peek at this since you've been poking up the upload code?
basically it added the function suggested by the user who is already commented in some stuff there, I contacted him and he sent me his function from the php manual site: http://www.php.net/manual/de/function.shell-exec.php#52826, so I added that all inside the antivirus function
(In reply to comment #0) > Created an attachment (id=6668) [details] > Fixed uploadbase.php Could you provide that as a patch against trunk so they can review it?
If I knew how, a quick explanation on how and I could probably do it
(In reply to comment #4) > If I knew how, a quick explanation on how and I could probably do it > You can Make a diff by checking out the trunk from the svn and then running svn diff and putting the output of that into a file you post here.
Created attachment 6671 [details] Improved patch Philip's version had several issues: it called the AV twice, discarded the output and defined the helper runExternal function inside detectVirus(). Here's a patch against trunk of the solution, fixing the above issues.
I don't actually have a windows server setup to test but "looks good" added in r57728
followup in r57729 we want to try and use the wfShellExec function. Let us know if that works on windows.
after some messing around with svn, patching it twice, and realizing it would add the same code twice if I did that, lol, I finally patched your patch, and it works!!! yay!! I say submit it to the svn trunk!