Centos 6.6 64bit on OpenVZ VPS.
I tried a phpinfo.php file using only the following code:
<?php
var_dump( exec('zip -r domains.zip "domains"') );
// phpinfo();
?>
.
The php error log is now: [Sat Jul 04 17:44:27 2015] [error] [client xxx.xxx.xxx.xxx] sh: zip: command not found
.
[root@server ~]# yum install zip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.atlanticmetro.net
* extras: mirror.trouble-free.net
* rpmforge: repoforge.mirror.constant.com
* updates: mirror.cogentco.com
Setting up Install Process
Package zip-3.0-1.el6.x86_64 already installed and latest version
Nothing to do
.
[root@server ~]# php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
ionCube Loader
json
libxml
mbstring
mcrypt
mysql
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
.
[root@server ~]# php -v
PHP 5.4.27 (cli) (built: Jul 3 2015 18:06:21)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.11, Copyright (c) 2002-2015, by ionCube Ltd.
MORE INFO
I want to add /usr/bin/zip to the executable path for the web server.
I've tried:
export PATH=$PATH:/usr/bin/zip
AND
cd /usr/bin sudo ln -s /usr/bin/zip zip
But neither one worked.