LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-26-2011, 12:04 PM   #1
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Rep: Reputation: 1
Question Install libclamav with PHP *cannot find clamav files in default path*


I am having a big problem trying to allow PHP to scan files, using clamav libs in PHP.

I downloaded the relevant files from:
http://www.clamav.net/lang/en/downlo...party-library/

Anyways I am stuck on the tutorial for installing it in the 'INSTALL' file, where it says to run the command:
Quote:
./configure --with-clamav
It runs for a duration but then halts on the following error:
Quote:
configure:3438: result: yes, shared
configure:3453: checking for clamav files in default path
configure:3465: result: not found
configure:3467: error: Please reinstall the clamav distribution
It suggests that 'configure:3465' that the files where not found going by the line above that.

Not being in the default path, does anyone know where to make libclamav work?

Does anyone know of an easier way of locating such files that it's looking for?

Drastically stuck here, just wondered if anyone could help me please?

Much appreciate any replies in advance,
Jeremy.
 
Old 05-26-2011, 01:20 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,787

Rep: Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847
Hi,

I guess it's looking for clamav shared libraries and header files, like libclamav.so and clamav.h.
You didn't say your distro, but you need to use the distro's package manager to install something like libclamav-dev, along with the clamav package


Regards
 
1 members found this post helpful.
Old 05-27-2011, 03:43 AM   #3
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Ahh yes of course, thank you ever so much!

I forgot about that since I have installed a few other packages/modules in PHP and they needed the header files and which ever of a -dev part of an application.

I think it would be an rpm, since it's what came out of iRedMail you see, I will have a hunt around for it anyways and search an outout from yum and see what happens, since I am using Centos 5.6.

Thank you ever so much again though, very helpful,
Jeremy.

Last edited by j.smith1981; 05-27-2011 at 03:49 AM.
 
Old 05-27-2011, 03:50 AM   #4
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Actually I cannot find it.

The version when I ran:

Quote:
# rpm -q clamav
It came up with this version here:
Quote:
clamav-0.97-1.el5.rf
As I can remember, this is the latest version, I can just find it on their website can't I?

I mean this is what I have found when I search with yum:

Quote:
clamav.i386 : Anti-virus software
clamav.x86_64 : Anti-virus software
clamav-db.i386 : Virus database for clamav
clamav-db.x86_64 : Virus database for clamav
clamd.i386 : The Clam AntiVirus Daemon
clamd.x86_64 : The Clam AntiVirus Daemon
Thats all there is, when I enable all the repos where rpm packages can be found, thats the whole list when I search even for just 'clam' without anything else!

Any help as usual is appreciated, failing that I could just use the exec() command in PHP to use the shell but that would take a little more work than what I originally wanted.

Just thought it would be quite interesting to get this working.

As I said any help's much appreciated!
Jeremy.

Last edited by j.smith1981; 05-27-2011 at 04:04 AM.
 
Old 05-27-2011, 04:29 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,787

Rep: Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847
Hi,

Doing a little googling, I was able to find the clamav-devel package here

Regards
 
1 members found this post helpful.
Old 05-27-2011, 05:31 AM   #6
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Ahh thank you so much!

Why could not I find that myself?

Probably looking for the wrong package, what did you search for by any chance?

Thank you so much for assisting me, was just getting on with another approach to file scanning, was not really working very well.

Really appreciate that!
Jeremy.
 
Old 05-27-2011, 05:53 AM   #7
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Thank you ever so much!

Now got it working as a module in PHP.

Checked its loaded within a script and it now works, many thanks!

Jeremy
 
Old 05-27-2011, 06:16 AM   #8
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Hmm got it working installed as a module however.

I just wondered where would I locate the directory where my signatures for clamav exist please?

It's just I have checked an email I was told had a virus and got PHP to check in that particular directory, for testing purposes only available to me.

But came up with no virus found, this will be due to the following message:

Quote:
ClamAV version 0.97 with 0 virus signatures loadedcl_info() return :
With the main part of the worry being '0 virus signatures' is there anyway of locating where I can find all my signatures please?

Just I think this will be finished once I get those.

Thank you for your help so far and I appreciate any replies in advance,
Jeremy
 
Old 05-27-2011, 06:32 AM   #9
j.smith1981
Member
 
Registered: Feb 2009
Distribution: Mainly CentOS6.4 x64
Posts: 161

Original Poster
Rep: Reputation: 1
Ahh sorry found it!

You can ignore the last comment and a final thank you ever so much for helping me out, it's loaded the signatures, weird how it wasn't working when I set it in the php.d/clamav.ini file I made, where to locate the db files.

I did a manual reboot of my server and it worked eventually, so thank you once again, now this post is closed, must be something wrong with their logic in the test scripts, probably did not change something maybe they should have.

Quite used to that now in my time of web development work, also it's not really sucking too much power out either, which is what I was worried about.

All the best,
Jeremy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Searching for php files with Find and Grep ssmela Linux - General 3 11-02-2010 02:55 PM
LibClamAV on ClamAV 0.92.1 always Warning and Error katrok Linux - Software 1 05-21-2009 08:00 AM
libclamav.so.5. Klamav cannot find it. cwizardone Slackware 3 04-22-2009 03:01 PM
cannot find installation path (adobe flash install) bloodyscript Linux - Software 7 06-11-2007 08:49 PM
Default Apache & PHP install on RH 8.0 merana Linux - General 14 03-19-2003 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration