Solved

problem configuring clamav with php-clamav

Posted on 2014-03-09
27
1,730 Views
Last Modified: 2014-03-09
ubuntu 12.04 lts
clamscan engine version 0.97.8
php-clamav_0.15.7.tar.gz

Reference articles used: http://www.howtoforge.com/scan_viruses_with_php_clamavlib and http://askubuntu.com/questions/166280/how-do-i-install-the-clamav-extension-for-php-5

I followed the articles and seem to be missing clamav.so.  I have reinstalled clamav about 15 times I have been searching for clamav.so on the internet but no luck.
I have verified that clamscan works but

Any suggestions.



Reverence #1 (./configure --with-clamav)
---------------------------------------------------------
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for clamav support... yes, shared
checking for clamav files in default path... not found
configure: error: Please reinstall the clamav distribution


Reference#2
make: *** no targets specified and no makefile found

cd modules/clamav.so /usr/local/lib/php/extensions/
-bash: cd: modules/clamav.so: No such file or directory
0
Comment
Question by:cesemj
  • 17
  • 10
27 Comments
 
LVL 34

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 39915922
checking for clamav files in default path... not found
Check where clamav is installed, then add that path to the default path, using
export PATH=/usr/local/clamav/bin:$PATH

replace /usr/local/clamav/bin with the actual path

HTH,
Dan
0
 

Author Comment

by:cesemj
ID: 39915945
ok I just uninstalled clamav
using the following so I can start over:

sudo apt-get --purge remove clamav clamav-base clamav-daemon clamav-freshclam libclamav2

I will reinstall clamav using apt-get install clamav again and do what you said. I will update in a couple of mins.
0
 

Author Comment

by:cesemj
ID: 39915971
I did a locate clamav | more and noticed that apt-get installed clamav into /etc/vlamav. so I export PATH=/etc/clamav/:$PATH.  I ran ./configure --with-clamav again from the /usr/local/bin/clamavphp/php-clamav-0.15.7 directory and still receive checking for clamav files in default path... not found
configure: error: Please reinstall the clamav distribution


The files located in /etc/clamav are:

clamd.conf
freshclam.conf
onerrorexecute.d
onupdateexecute.d
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916039
Where is the bin dir for clamav? Where the executables (clamd) are in?

What happens when you try to run clamd?
0
 

Author Comment

by:cesemj
ID: 39916068
I receive ERROR: initgroups() failed.
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916075
OK. Test if freshclam is working. If it is, you have to create a user for ClamAV
# groupadd clamav
# useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav

Open in new window

After that, I think you'll need to edit clamd.conf, or you'll receive another error.
0
 

Author Comment

by:cesemj
ID: 39916095
I am removing clamav again and will download from clamav instead of using apt-get:


sudo apt-get --purge remove clamav clamav-base clamav-daemon clamav-freshclam libclamav2
0
 

Author Comment

by:cesemj
ID: 39916222
No error when executed group and useradd, I had a problem downloading clamav from  

This is where I am at. Yes I am pulling my here out.  

root#~#clamscan -V
ClamAV 0.97.8


root#~# clamscan -v
Scanning /root/.dmrc
/root/.dmrc: OK
Scanning /root/.pulse-cookie
/root/.pulse-cookie: OK
Scanning /root/.selected_editor
/root/.selected_editor: OK
Scanning /root/.bash_history
/root/.bash_history: OK
Scanning /root/.xsession-errors
/root/.xsession-errors: OK
Scanning /root/.xscreensaver
/root/.xscreensaver: OK
Scanning /root/.viminfo
/root/.viminfo: OK
Scanning /root/.bashrc
/root/.bashrc: OK
Scanning /root/.Xauthority
/root/.Xauthority: OK
Scanning /root/.rnd
/root/.rnd: OK
Scanning /root/.mysql_history
/root/.mysql_history: OK
Scanning /root/.profile
/root/.profile: OK

----------- SCAN SUMMARY -----------
Known viruses: 43
Engine version: 0.97.8
Scanned directories: 1
Scanned files: 12
Infected files: 0
Data scanned: 0.07 MB
Data read: 0.04 MB (ratio 2.00:1)
Time: 0.975 sec (0 m 0 s)
0
 

Author Comment

by:cesemj
ID: 39916225
I am going to install clamd

root:~# clamd -v
The program 'clamd' is currently not installed.  You can install it by typing:

apt-get install clamav-daemon
root:~# ^C
root:~# clamd
The program 'clamd' is currently not installed.  You can install it by typing:
apt-get install clamav-daemon
root:~#
0
 

Author Comment

by:cesemj
ID: 39916260
Ok Starting from scratch again

Removed clamav again and reboot:

Step 1 (NOTE: the clamav 0.98 or 98.1 did not work kept receiving make errors, so I wen back to apt-get)

sudo apt-get install clamav clamav-base clamav-daemon clamav-freshclam
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libnumber-compare-perl libdate-calc-xs-perl libfile-find-rule-perl libdate-calc-perl libcarp-clan-perl libtext-glob-perl libbit-vector-perl
Use 'apt-get autoremove' to remove them.
Suggested packages:
  clamav-docs
The following NEW packages will be installed:
  clamav clamav-base clamav-daemon clamav-freshclam
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/579 kB of archives.
After this operation, 2,630 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package clamav-base.
(Reading database ... 219395 files and directories currently installed.)
Unpacking clamav-base (from .../clamav-base_0.97.8+dfsg-1ubuntu1.12.04.1_all.deb) ...
Selecting previously unselected package clamav-freshclam.
Unpacking clamav-freshclam (from .../clamav-freshclam_0.97.8+dfsg-1ubuntu1.12.04.1_amd64.deb) ...
Selecting previously unselected package clamav.
Unpacking clamav (from .../clamav_0.97.8+dfsg-1ubuntu1.12.04.1_amd64.deb) ...
Selecting previously unselected package clamav-daemon.
Unpacking clamav-daemon (from .../clamav-daemon_0.97.8+dfsg-1ubuntu1.12.04.1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up clamav-base (0.97.8+dfsg-1ubuntu1.12.04.1) ...
Setting up clamav-freshclam (0.97.8+dfsg-1ubuntu1.12.04.1) ...
 * Starting ClamAV virus database updater freshclam                                                                                                   [ OK ]
Setting up clamav (0.97.8+dfsg-1ubuntu1.12.04.1) ...
Setting up clamav-daemon (0.97.8+dfsg-1ubuntu1.12.04.1) ...
 * Clamav signatures not found in /var/lib/clamav
 * Please retrieve them using freshclam
 * Then run '/etc/init.d/clamav-daemon start'

Step 2:

root:~# /etc/init.d/clamav-daemon start
 * Starting ClamAV daemon  clamd                                                                                                                       [ OK ]

Step 3:
root:~# groupadd clamav
groupadd: group 'clamav' already exists
root:~# useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav
useradd: user 'clamav' already exists

Step 4:

root:~# clamd
ERROR: initgroups() failed.


Any suggestions what I am doing wrong.
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916268
What is the content of clamd.conf?
0
 

Author Comment

by:cesemj
ID: 39916280
Hi,

Please find contents:

root:/# cat /etc/clamav/clamd.conf | more
#Automatically Generated by clamav-base postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-base
#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666
# TemporaryDirectory is not set to its default /tmp here to make overriding
# the default with environment variables TMPDIR/TMP/TEMP possible
User clamav
AllowSupplementaryGroups true
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 180
MaxThreads 12
MaxConnectionQueueLength 15
LogSyslog false
LogFacility LOG_LOCAL6
LogClean false
LogVerbose false
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /var/lib/clamav
SelfCheck 3600
Foreground false
Debug false
ScanPE true
ScanOLE2 true
ScanHTML true
DetectBrokenExecutables false
ExitOnOOM false
LeaveTemporaryFiles false
AlgorithmicDetection true
ScanELF true
IdleTimeout 30
PhishingSignatures true
PhishingScanURLs true
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
root@regtap:/# cat /etc/clamav/clamd.conf | more
#Automatically Generated by clamav-base postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-base
#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666
# TemporaryDirectory is not set to its default /tmp here to make overriding
# the default with environment variables TMPDIR/TMP/TEMP possible
User clamav
AllowSupplementaryGroups true
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 180
MaxThreads 12
MaxConnectionQueueLength 15
LogSyslog false
LogFacility LOG_LOCAL6
LogClean false
LogVerbose false
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /var/lib/clamav
SelfCheck 3600
Foreground false
Debug false
ScanPE true
ScanOLE2 true
ScanHTML true
DetectBrokenExecutables false
ExitOnOOM false
LeaveTemporaryFiles false
AlgorithmicDetection true
ScanELF true
IdleTimeout 30
PhishingSignatures true
PhishingScanURLs true
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
DetectPUA false
ScanPartialMessages false
HeuristicScanPrecedence false
StructuredDataDetection false
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo true
OLE2BlockMacros false
StreamMaxLength 25M
LogFile /var/log/clamav/clamav.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
OfficialDatabaseOnly false
CrossFilesystems true
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916290
Looks OK from here...

And I see you successfully started the daemon (Step 2).

Can you verify it's running? ps -aux | grep 'clam'
0
 

Author Comment

by:cesemj
ID: 39916311
Hi,

Please find results:
root:~# ps -aux | grep 'clam'
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
clamav    5725  0.2  0.0  46088  2268 ?        Ss   16:01   0:08 /usr/bin/freshclam -d --quiet
clamav    6628  0.0  3.1 389852 258036 ?       Ssl  16:05   0:00 /usr/sbin/clamd
root      9288 76.5  3.5 382184 293284 ?       Rl   16:57   0:55 clamscan --infected --recursive --remove --log=/var/log/clamav/virus.log /var/www/corp.server1.info/web/
root      9515  0.0  0.0   9392   940 pts/1    S+   16:58   0:00 grep --color=auto clam
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916330
Just looked on your apt-get commands. I think you need the dev package also

sudo apt-get install libclamav-dev
0
 

Author Comment

by:cesemj
ID: 39916404
root:~# apt-get install libclamav-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libnumber-compare-perl libdate-calc-xs-perl libfile-find-rule-perl
  libdate-calc-perl libcarp-clan-perl libtext-glob-perl libbit-vector-perl
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libbz2-dev libidn11-dev libtommath-dev libtommath-docs
The following NEW packages will be installed:
  libbz2-dev libclamav-dev libidn11-dev libtommath-dev libtommath-docs
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,199 kB of archives.
After this operation, 3,340 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libbz2-dev amd64 1.0.6-1                                                                                         [32.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main libidn11-dev amd64 1.23-                                                                                        2 [636 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/main libtommath-dev amd64 0.4                                                                                        2.0-1 [75.7 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libclamav-dev am                                                                                        d64 0.97.8+dfsg-1ubuntu1.12.04.1 [13.4 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise/main libtommath-docs all 0.42                                                                                        .0-1 [1,441 kB]
Fetched 2,199 kB in 3s (721 kB/s)
Selecting previously unselected package libbz2-dev.
(Reading database ... 219482 files and directories currently installed.)
Unpacking libbz2-dev (from .../libbz2-dev_1.0.6-1_amd64.deb) ...
Selecting previously unselected package libidn11-dev.
Unpacking libidn11-dev (from .../libidn11-dev_1.23-2_amd64.deb) ...
Selecting previously unselected package libtommath-dev.
Unpacking libtommath-dev (from .../libtommath-dev_0.42.0-1_amd64.deb) ...
Selecting previously unselected package libclamav-dev.
Unpacking libclamav-dev (from .../libclamav-dev_0.97.8+dfsg-1ubuntu1.12.04.1_amd64.deb) ...
Selecting previously unselected package libtommath-docs.
Unpacking libtommath-docs (from .../libtommath-docs_0.42.0-1_all.deb) ...
Processing triggers for install-info ...
Processing triggers for man-db ...
Setting up libbz2-dev (1.0.6-1) ...
Setting up libidn11-dev (1.23-2) ...
Setting up libtommath-dev (0.42.0-1) ...
Setting up libclamav-dev (0.97.8+dfsg-1ubuntu1.12.04.1) ...
Setting up libtommath-docs (0.42.0-1) ...
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916416
OK, now clamav.so should be available.
0
 

Author Comment

by:cesemj
ID: 39916420
root:# clamd
ERROR: initgroups() failed.
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916427
clamd is already running, as per your ps command. I have no idea why it errors when trying to run it manually.

Since you installed the dev libraries, your
./configure --with-clamav
should work
0
 

Author Comment

by:cesemj
ID: 39916436
ok I will try reinstall php-clamav_0.15.7.tar.gz
0
 

Author Comment

by:cesemj
ID: 39916452
Oh My God! Progress. I have been at this since Tuesday.

root:/usr/local/bin/php-clamav-0.15.7# ls
CHANGES   config.m4   CREDITS  INSTALL       phpclamav_test.php  SPECS
clamav.c  config.w32  debian   php_clamav.h  README              TODO

root:/usr/local/bin/php-clamav-0.15.7# phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626


root:/usr/local/bin/php-clamav-0.15.7# ./configure --with-clamav
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for clamav support... yes, shared
checking for clamav files in default path... found in /usr
checking for cl_retver in -lclamav... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands


root:/usr/local/bin/php-clamav-0.15.7# make
/bin/sh /usr/local/bin/php-clamav-0.15.7/libtool --mode=compile cc  -I. -I/usr/local/bin/php-clamav-0.15.7 -DPHP_ATOM_INC -I/usr/local/bin/php-clamav-0.15.7/include -I/usr/local/bin/php-clamav-0.15.7/main -I/usr/local/bin/php-clamav-0.15.7 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/bin/php-clamav-0.15.7/clamav.c -o clamav.lo
libtool: compile:  cc -I. -I/usr/local/bin/php-clamav-0.15.7 -DPHP_ATOM_INC -I/usr/local/bin/php-clamav-0.15.7/include -I/usr/local/bin/php-clamav-0.15.7/main -I/usr/local/bin/php-clamav-0.15.7 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/bin/php-clamav-0.15.7/clamav.c  -fPIC -DPIC -o .libs/clamav.o
/bin/sh /usr/local/bin/php-clamav-0.15.7/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/local/bin/php-clamav-0.15.7/include -I/usr/local/bin/php-clamav-0.15.7/main -I/usr/local/bin/php-clamav-0.15.7 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o clamav.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/local/bin/php-clamav-0.15.7/modules  clamav.lo -lclamav
libtool: link: cc -shared  -fPIC -DPIC  .libs/clamav.o   /usr/lib/libclamav.so  -O2   -pthread -Wl,-soname -Wl,clamav.so -o .libs/clamav.so
libtool: link: ( cd ".libs" && rm -f "clamav.la" && ln -s "../clamav.la" "clamav.la" )
/bin/sh /usr/local/bin/php-clamav-0.15.7/libtool --mode=install cp ./clamav.la /usr/local/bin/php-clamav-0.15.7/modules
libtool: install: cp ./.libs/clamav.so /usr/local/bin/php-clamav-0.15.7/modules/clamav.so
libtool: install: cp ./.libs/clamav.lai /usr/local/bin/php-clamav-0.15.7/modules/clamav.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/sbin" ldconfig -n /usr/local/bin/php-clamav-0.15.7/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/bin/php-clamav-0.15.7/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.


root:/usr/local/bin/php-clamav-0.15.7# make install
Installing shared extensions:     /usr/lib/php5/20090626/


root:/usr/local/bin/php-clamav-0.15.7# echo "extension=clamav.so" > /etc/php5/conf.d/clamav.ini

root:/usr/local/bin/php-clamav-0.15.7# service apache2 restart
 * Restarting web server apache2                                                                                                                                        [Sun Mar 09 19:32:32 2014] [warn] NameVirtualHost *:80 has no VirtualHosts
 ... waiting [Sun Mar 09 19:32:33 2014] [warn] NameVirtualHost *:80 has no VirtualHosts
                                                                                                                                                                 [ OK ]
0
 

Author Comment

by:cesemj
ID: 39916461
Question: I did not encounter any errors like before but when I try to locate clamav.so I receive the following information below.  Please tell me what you think I am still doing wrong.

root:/usr/local/bin/php-clamav-0.15.7# locate clamav.so | more
/usr/lib/libclamav.so.6
/usr/lib/libclamav.so.6.1.17
0
 

Author Comment

by:cesemj
ID: 39916463
Another question: I was using the cat command so I can read the file clamav.ini and I received the following.

root:/usr/local/bin/php-clamav-0.15.7# cat /etc/php5/conf.d/clamav.ini | more
extension=clamav.so

Is there really a clamav.so file?
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916469
An .so is a compiled library file (shared object). Like a .dll, if you're familiar with Windows.

You're not doing anything wrong.
The clamav.so will usually be a symlink to whatever version of libclamav.so you have on your system. This way if the library gets updated (for ex to libclamav.so.6.1.18) you don't need to recompile anything, just update the symlink.
0
 

Author Comment

by:cesemj
ID: 39916473
You are right:

root:/usr/local/bin/php-clamav-0.15.7# ls
acinclude.m4    CHANGES    config.guess  config.m4      configure     debian
aclocal.m4      clamav.c   config.h      config.nice    configure.in  include
autom4te.cache  clamav.la  config.h.in   config.status  config.w32    INSTALL
build           clamav.lo  config.log    config.sub     CREDITS       install-sh

root:/usr/local/bin/php-clamav-0.15.7# cd modules

root:/usr/local/bin/php-clamav-0.15.7/modules# ls
clamav.so
0
 

Author Closing Comment

by:cesemj
ID: 39916567
I appreciate your insight and guidance!!!!!!!!!!!!!!!!!!!!
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39916807
Glad I could help!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you thought ransomware was bad, think again! Doxware has the potential to be even more damaging.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question