mjm7867 Posted November 14, 2006 Share Posted November 14, 2006 I am trying to run clamAV (Command line Antivirus) on Centos 4.4, when i try system("clamscan") on PHP,i get the following error: "sh:clamscan: command not found"other commands are working fine such is system(ls), system("ls -l").., even though on the command line "clamscan" works fineNeed help please Thanks in advance!!! Link to comment https://forums.phpfreaks.com/topic/27171-system-call-error-in-php/ Share on other sites More sharing options...
trq Posted November 14, 2006 Share Posted November 14, 2006 Looks to me like clamscan may not be within the apache users path. Where is clamscan located? And what does...[code]<?phpsystem(echo $PATH);?>[/code]produce? Link to comment https://forums.phpfreaks.com/topic/27171-system-call-error-in-php/#findComment-124247 Share on other sites More sharing options...
mjm7867 Posted November 14, 2006 Author Share Posted November 14, 2006 nvm it works now, actually i had to give it the path, i was executing it from the wrong directory,so i had to write system("/usr/local/bin/clamscan")thanks for help though! Link to comment https://forums.phpfreaks.com/topic/27171-system-call-error-in-php/#findComment-124250 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.