LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache error_log line: sh: zip: command not found (http://www.linuxquestions.org/questions/linux-server-73/apache-error_log-line-sh-zip-command-not-found-949137/)

AcorpComputers 06-08-2012 12:17 AM

Apache error_log line: sh: zip: command not found
 
I am running Apache2 on a CentOS 5.8 x64 server, with many virtual hosts set up. Each virtual host has its own error_log and access_log, however in the, "main" error_log (/var/log/httpd/error_log) I have, for the last week or so, begun to see the following line:

Code:

sh: zip: command not found
There is no other information attached - no date, no time, no IP, no referrer, nothing - just the above. Typically I will see this line repeated 10, 20 or more times, though sometimes it only gets repeated once or twice before the next event gets logged.

Google search reveals this error is seen mainly in the context of compiling programs when the zip binary is not present or the path is not specified correctly...I would hope my Apache and web sites are not doing any type of compiling! Why am I getting this error? What Apache site or directive (?) is trying to zip something - and why is it appearing in the main error_log?

Any idea what this error line is telling me (other than the obvious, that it can't find the proper path to the zip binary)?

TIA,

- Acorp

Slackyman 06-08-2012 01:06 AM

A hosted website is trying to run zip (e.g. from PHP or CGI) but cannot find it in the PATH.
Try by yourself creating a zip.php page containing:
Code:

<?php exec("zip zip.php", $output, $arg); 
echo $arg; ?>

Try to discover if Apache has /usr/bin set in PATH bu running the php script
Code:

<?php phpinfo(); ?>
and check the PATH content.

AcorpComputers 06-09-2012 04:17 AM

Thanks a lot. I was a little confused, because your zip.php code produced the same error. So then I checked the phpinfo.php, but the path was set correctly. A little more digging, however, revealed that I didn't have zip installed. bzip, gzip, and a bunch of others, but not plain old "zip".

I have installed it, and hope to see those errors go away. One question...do you think I am exposing myself to anything, "terrible" by installing and allowing access to the zip binary? Looks like it is currently used by a Wordpress backup program, which, other than not purging older backups, is probably not a big deal. Other thoughts?

Thanks for the help!

- Acorp


All times are GMT -5. The time now is 01:10 PM.