Follow up...
The php error log is now: [Sat Jul 04 17:44:27 2015] [error] [client] sh: zip: command not found
How do I correct this? It appears zip module is already installed as a dependency by default.
I tried a phpinfo.php file using only the following code:
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] sh: zip: command not found
Code:
~]# yum install zip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
----
Setting up Install Process
Package zip-3.0-1.el6.x86_64 already installed and latest version
Nothing to do
Code:
[root ~]# 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
It's already set to 5.4 PHP and zip is already compiled.
"You are running PHP version: 5.4.27"
Installed dependencies first too.
These are the flags which I already compiled.
Code:
./configure
--prefix=/opt/alt/php54/usr
--with-zlib
--enable-soap
--enable-exif
--with-config-file-path=/opt/alt/php54/usr/php
--with-config-file-scan-dir=/opt/alt/php54/usr/php/php.d
--enable-phar
--enable-bcmath
--enable-calendar
--with-curl
--with-iconv
--with-mysql
--with-mysqli
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-mcrypt
--with-gettext
--with-xsl
--with-xmlrpc
--with-pdo-mysql=mysqlnd
--enable-posix
--enable-ftp
--with-openssl
--enable-mbstring
--with-jpeg-dir=/usr
--with-freetype-dir=/usr
--with-kerberos
--with-xsl
--with-bz2
--enable-sockets
--enable-zip
--with-gd
--with-imap
--with-imap-ssl
--enable-sockets
--with-pcre-regex
--libdir=/usr/lib64
--with-mysql-sock=/var/lib/mysql/mysql.sock
Output of phpinfo.php ends up being
I changed "zip" to "/usr/bin/zip" in the phpinfo.php file and the out come was:
Code:
string(42) "updating: domains/xxxxxx.co/ (stored 0)"
Now, how do I do change this in the VPS so that path is always defined and able to be called by any script without having to manually define the full path?
I want to add /usr/bin/zip to the executable path for the web server.
I've tried:
Code:
export PATH=$PATH:/usr/bin/zip
AND
Code:
sudo ln -s /usr/bin/zip zip
but neither helped
I even ran this below, didn't fix it:
ln -s /usr/sbin/zip /usr/bin/zip
I also added this line in /usr/local/apache/bin/envvars and restarted apache, still no fix.
Code:
export PATH=$PATH:/usr/bin
Also:
Code:
[root ~]# file /usr/bin/zip
/usr/bin/zip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
Code:
[root ~]# file /usr/sbin/zip
/usr/sbin/zip: symbolic link to `/usr/bin/zip'