Forums | Mahara Community
Support
/
Cannot upload file after Mahara upgrade
26 April 2023, 19:44
Dear support,
Please note that we have upgraded Mahara recently from 21.04 to 22.10. We have also upgraded the clamAV to the latest version: ClamAV 0.103.8/26818/Mon Feb 20 16:21:31 2023.
However, it seems the user cannot upload file and hit the following error:
In config.php:
$cfg->pathtoclam = '/bin/clamdscan';
Do you have any idea? Thanks.
Regards,
George
27 April 2023, 9:19
Hi George,
That error message will be returned if the following is the case:
if (!file_exists($pathtoclam) || !is_executable($pathtoclam)) {
If the path supplied for ''pathtoclam'' does not actually match the place of the clam scan executable or if it's not able to be run by the web server.
Can you check the '/bin/ directory to see if the 'clamdscan' file is there.
I note on my machine it is installed at /usr/bin/clamdscan
Also with the newer clamdscan you will need to install the daemon, via:
sudo apt-get install clamav-daemon
To further diagnose the problems you can add a line to you code and check your error logs for the problem. In htdocs/lib/uploadmanager.php after the code: exec($cmd, $output, $return); on line 372 add in: log_debug($output);
This will give you the reason why the upload is failing
Cheers
Robert
03 May 2023, 22:32
Dear Robert,
Thanks a lot for your reply. The debug code works very well. I found the clamav cannot be started. I found it can started after I created that directory:
/var/tmp/clamtest/
The problem solved after the clamav started successfully.
Regards