install PHP clamavlib

Discussion in 'Installation/Configuration' started by JULINT, Jan 30, 2021.

  1. JULINT

    JULINT Member

    I want to install php clamav lib to validate user upload files from my website.
    I am trying to install it with command : apt-get install php7.4-clamavlib
    (cannot find package for php7.4-clamavlib)

    my server specification:
    IspConfig 3
    Ubuntu 20.04
    PHP 7.4
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    You could try searching for that package; what instructions were you following that said to install it?
     
  3. JULINT

    JULINT Member

    Hi Jesse,
    Yes.. i am keep searching on its package..

    My website has an upload image form on public url..and i think i need to make sure that user's uploaded image is not a virus.

    Code:
     if($_FILES['file']['size'] == 0 || !is_file($_FILES['file']['tmp_name'])){
         $error .= 'Please select a file for upload!';
      } else {
        cl_setlimits(5, 1000, 200, 0, 10485760);
        if($malware = cl_scanfile($_FILES['file']['tmp_name'])) $error .= 'We have Malware: '.$malware.'<br>ClamAV version: '.clam_get_version();
      }
    
    And i need an php clamav lib extension to make it working...
     
  4. JULINT

    JULINT Member

    Any suggestion about its command to install php clamav ?
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Are you sure clamavlib is available for PHP 7? I can only find ten year old versions for PHP 4 and PHP 5.
     
  6. JULINT

    JULINT Member

    I am not sure about it.

    Thanks for letting me know about it.
     

Share This Page