Skip to content
Init is here / May 19 - 23
Back

Unable to connect to ClamAV server

  • 0
  • Web
Sanit
21 May, 2024, 13:02

I am using the https://github.com/appwrite/php-clamav package for scanning files before uploading them to the AWS server. But I am getting the error "Unable to connect to ClamAV server". Server I am using a Linux server on IONOS. I followed the installation procedure. But getting this error while trying to scan a file while uploading.

Here is my error log :

PHP Fatal error: Uncaught RuntimeException: Unable to connect to ClamAV server in /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-content/plugins/wp-s3-user-upload/vendor/appwrite/php-clamav/src/ClamAV/Network.php:66 Stack trace: #0 /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-content/plugins/wp-s3-user-upload/vendor/appwrite/php-clamav/src/ClamAV/ClamAV.php(36): Appwrite\ClamAV\Network->getSocket() #1 /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-content/plugins/wp-s3-user-upload/vendor/appwrite/php-clamav/src/ClamAV/ClamAV.php(52): Appwrite\ClamAV\ClamAV->sendCommand() #2 /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-content/plugins/wp-s3-user-upload/inc/ucua-functions.php(371): Appwrite\ClamAV\ClamAV->ping() #3 /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-includes/class-wp-hook.php(324): aws_s3_upload_process() #4 /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #5 /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-includes/plugin.php(517): WP_Hook->do_action() #6 /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-admin/admin-ajax.php(192): do_action() #7 {main} thrown in /var/www/vhosts/networksfortraining.org/sandbox-app-three.networksfortraining.org/wp-content/plugins/wp-s3-user-upload/vendor/appwrite/php-clamav/src/ClamAV/Network.php on line 66

Thanks.

TL;DR
Developers are unable to connect to the ClamAV server when using the PHP package for scanning files before uploading to AWS. The error log shows a Fatal error due to inability to connect to the ClamAV server on the Linux server. To resolve this, check the network connection, verify ClamAV server settings, and ensure the server configuration aligns with the package requirements.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more