Current File : /home/inlingua/public_html/decay_sym/root/var/softaculous/apps/php81/build/make.sh |
#!/bin/bash
source /var/softaculous/apps/build/common.sh
PATH_PHP81=$AMPPS_PATH/php81
php81=php-8.1.33
PATH_APACHE=$AMPPS_PATH/apache
gmp=gmp-6.2.0
imap=imap # need lower openssl-1.0.2 versions
PATH_PGSQL=$AMPPS_PATH/pgsql
suphp=suphp-0.7.1
PATH_APACHE2=$AMPPS_PATH/apache2
libmemcached=libmemcached-1.0.18
php81_memcached=memcached-3.2.0
mailparse=mailparse-3.1.2
imagick=imagick-3.7.0
PATH_IMAGICK=/usr/local/apps/imagemagick
sodium=libsodium-2.0.23 #https://pecl.php.net/package/libsodium
mongo=mongodb-1.12.0 # for php 71+ latest not compatible below php 71
mod_varnish=varnish-1.2.6
apcu=apcu-5.1.22
memcache=memcache-8.2
phpredis=redis-5.3.7
phpmcrypt=mcrypt-1.0.5
PATH_PHPXX="";
dbase=dbase-7.1.1
pdflib=PDFlib-10.0.1-Linux-x64-C-C++
php_pdf=pdflib-4.1.4
newrelic=newrelic-php5-10.15.0.4-linux #https://download.newrelic.com/php_agent/release/
eio=eio-2.0.4
enchant=enchant-1.1.0
fileinfo=Fileinfo-1.0.4
gender=gender-1.1.0
php_geoip=geoip-1.1.1
gnupg=gnupg-1.5.1
grpc=grpc-0.5.0
raphf=raphf-2.0.1
propro=propro-2.1.0
couchbase=couchbase-2.0.3
inotify=inotify-3.0.0
leveldb=leveldb-0.3.0
luasandbox=LuaSandbox-4.1.0
lzf=LZF-1.7.0
oci8=oci8-2.2.0
yaml=yaml-2.2.2
xdebug=xdebug-3.1.5
uuid=uuid-1.2.0
uploadprogress=uploadprogress-2.0.2
trader=trader-0.5.1
timezonedb=timezonedb-2022.5
swoole=swoole-4.8.12
stats=stats-1.0.5
sqlsrv=sqlsrv-5.10.1
pdo_sqlsrv=pdo_sqlsrv-5.10.1
geospatial=geospatial-0.3.2
gmagick=gmagick-2.0.6RC1
vips=vips-1.0.13
ssh2=ssh2-1.4.1
zstd=zstd-0.13.1
igbinary=igbinary-3.2.14
zstd=zstd-0.14.0
php81_cgi() {
is_file $PATH_PHP81"/bin/php-cgi"
if [ $? == 0 ]
then
# Libraries
#libtool
#libxml
# Preapps
#apache
remove_dir $php81
banner "Installing PHP-CGI 8.1"
cd $SRC_PATH
is_file $php81.tar.gz
if [ $? == 0 ]
then
banner $php81".tar.gz Downloading"
wget --no-check-certificate https://www.php.net/distributions/$php81.tar.gz >> $LOG 2>&1
fi
tar -zxf $php81.tar.gz
cd $php81
make distclean
PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
export PKG_CONFIG_PATH
PHP_AUTOCONF=/usr/local/bin/autoconf
export PHP_AUTOCONF
LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$PATH_PHP81 \
--with-config-file-path=$PATH_PHP81/etc \
--with-config-file-scan-dir=$PATH_PHP81/etc/php.d \
--includedir=$PATH_PHP81/include \
--libdir=$PATH_PHP81/lib \
--enable-opcache=no \
--with-libxml-dir=$AMPPS_PATH && make && make install >> $LOG 2>&1
fi
is_file $PATH_PHP81"/bin/php-cgi"
if [ $? == 0 ]
then
banner 'php-cgi 8.1 could not be installed due to some reason'
exit 1
fi
}
mod_php81() {
is_file $PATH_PHP81"/lib/libphp.so"
if [ $? == 0 ]
then
# Libraries
#libtool
#libxml
# Preapps
#apache
#php56_cgi
remove_dir $php81
banner "Installing Mod_PHP 8.1"
cd $SRC_PATH
is_file $php81.tar.gz
if [ $? == 0 ]
then
banner $php81".tar.gz Downloading"
wget --no-check-certificate https://www.php.net/distributions/$php81.tar.gz >> $LOG 2>&1
fi
tar -zxf $php81.tar.gz
cd $php81
make distclean
PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
export PKG_CONFIG_PATH
LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$PATH_PHP81 \
--with-apxs2=$PATH_APACHE/bin/apxs \
--with-config-file-path=$PATH_PHP81/etc \
--with-config-file-scan-dir=$PATH_PHP81/etc/php.d \
--includedir=$PATH_PHP81/include \
--libdir=$PATH_PHP81/lib \
--enable-opcache=no \
--with-libxml-dir=$AMPPS_PATH && make && make install >> $LOG 2>&1
mv $PATH_APACHE/modules/libphp.so $PATH_PHP81/lib/
fi
is_file $PATH_PHP81"/lib/libphp.so"
if [ $? == 0 ]
then
banner 'Mod PHP could not be installed due to some reason'
exit 1
fi
}
php81() {
is_file $PATH_PHP81"/ext/pdo_mysql.so"
if [ $? == 0 ]
then
# Libraries
#libtool
#curl
#bzip
#sqlite
#xslt
#mcrypt
#gdbm
#gd
#freetds
#gettext
#libxml
#libssh
# Pre
#mysql
#php81_cgi
#mod_php81
ln -s $SRC_PATH/$gmp/gmp.h /usr/include/gmp.h
ln -s $SRC_PATH/$gmp/gmp.h /usr/include/x86_64-linux-gnu/gmp.h
remove_dir $php81
banner "Installing PHP 8.1"
cd $SRC_PATH
is_file $php81.tar.gz
if [ $? == 0 ]
then
banner $php81".tar.gz Downloading"
wget --no-check-certificate https://www.php.net/distributions/$php81.tar.gz >> $LOG 2>&1
fi
tar -zxf $php81.tar.gz
cd $php81
make distclean
#ssh2
banner $AMPPS_PATH
# --with-apxs2=$AMPPS_PATH/bin/apxs
# comment this declaration because its dublicate and cause error.
sed -i 's/BGD_DECLARE(gdImagePtr) gdImageCrop(/\/\/BGD_DECLARE(gdImagePtr) gdImageCrop(/g' $AMPPS_PATH/include/gd.h
export PKG_CONFIG_PATH=/usr/local/apps/openssl-30/lib/pkgconfig:/usr/local/apps/curl-7/lib/pkgconfig:/usr/local/apps/icu69/lib/pkgconfig:/usr/local/apps/libavif/lib/pkgconfig:/usr/local/apps/lib/pkgconfig
#export CPPFLAGS="-I$AMPPS_PATH/include"
export ONIG_CFLAGS="-I$AMPPS_PATH/include"
export ONIG_LIBS="-L$AMPPS_PATH/lib -lonig"
export JPEG_CFLAGS ="-I$AMPPS_PATH/include"
export JPEG_LIBS ="-L$AMPPS_PATH/lib"
export ARGON2_CFLAGS="-I/usr/local/apps/libargon2/include"
export ARGON2_LIBS="-L/usr/local/apps/libargon2/lib -largon2"
LDFLAGS="-L$AMPPS_PATH/openssl-30/lib -L$AMPPS_PATH/snmp/lib -L$AMPPS_PATH/curl-7/lib -L$AMPPS_PATH/libavif/lib -L$AMPPS_PATH/lib -liconv "/
CPPFLAGS="-I$AMPPS_PATH/openssl-30/include -L$AMPPS_PATH/snmp/include -I$AMPPS_PATH/curl-7/include -I$AMPPS_PATH/include" /
./configure --prefix=$PATH_PHP81 \
--with-config-file-path=$PATH_PHP81/etc \
--with-config-file-scan-dir=$PATH_PHP81/etc/php.d \
--includedir=$PATH_PHP81/include \
--libdir=$PATH_PHP81/lib \
--enable-opcache=no \
--with-png-dir=$AMPPS_PATH \
--with-freetype=$AMPPS_PATH \
--enable-inline-optimization \
--disable-debug \
--enable-cli --enable-cgi --enable-force-cgi-redirect --enable-fastcgi \
--enable-discard-path \
--enable-filepro \
--enable-fpm \
--enable-ipv6 \
--enable-path-info-check \
--enable-magic-quotes \
--enable-track-vars \
--enable-trans-sid \
--enable-yp \
--without-gdbm \
--enable-xslt=$AMPPS_PATH \
--with-xsl=shared,$AMPPS_PATH \
--with-tidy=shared,$AMPPS_PATH \
--with-pear=shared,$PATH_PHP81/lib/php \
--enable-sockets=shared,$AMPPS_PATH \
--with-mime-magic --enable-fileinfo \
--enable-zend-multibyte \
--with-zlib-dir=$AMPPS_PATH \
--with-zlib=shared,$AMPPS_PATH \
--enable-zlib=shared,$AMPPS_PATH \
--with-zip=shared,$AMPPS_PATH \
--with-libxml=shared,$AMPPS_PATH \
--with-expat=$AMPPS_PATH --with-xml --enable-xmlreader --enable-xmlwriter --with-simplexml \
--with-ncurses=shared,$AMPPS_PATH/bin/ncurses5-config \
--enable-gd=shared \
--with-jpeg \
--with-avif \
--enable-gd-imgstrttf --enable-gd-native-ttf --without-xpm \
--with-gettext=shared,$AMPPS_PATH \
--with-bz2=shared,$AMPPS_PATH \
--enable-bcmath=shared \
--enable-calendar=shared \
--enable-ctype=shared \
--enable-filter \
--enable-exif=shared \
--enable-ftp=shared \
--enable-hash \
--enable-json \
--enable-shmop=shared --disable-sigchild \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--enable-reflection=shared \
--enable-session \
--enable-spl \
--enable-tokenizer=shared \
--enable-wddx=shared \
--enable-mysqlnd=shared \
--with-mysql=shared,mysqlnd \
--with-mysqli=shared,mysqlnd \
--with-openssl=shared,$AMPPS_PATH/openssl-30 \
--with-ldap=shared,$AMPPS_PATH \
--with-mhash=shared,$AMPPS_PATH \
--with-curl=shared,$AMPPS_PATH/curl-7 \
--enable-dba=shared \
--enable-dbase=shared \
--with-fdf=shared \
--enable-pdo=shared --with-pdo-mysql=shared,mysqlnd --with-pdo-mssql=shared,$AMPPS_PATH \
--with-pdo-sqlite=shared,$AMPPS_PATH --with-pdo-sqlite-external \
--with-sqlite=shared,$AMPPS_PATH --with-sqlite3=shared,$AMPPS_PATH \
--enable-soap=shared \
--enable-pcntl=shared\
--enable-dbx=shared \
--with-gmp=shared,$AMPPS_PATH \
--with-iconv=shared,$AMPPS_PATH \
--without-kerberos \
--with-pdf=shared \
--enable-phar \
--enable-mailparse \
--with-pgsql=shared,$PATH_PGSQL \
--with-pdo-pgsql=shared,$PATH_PGSQL \
--enable-intl=shared \
--enable-mbstring=shared \
--enable-mbstr-enc-trans --enable-mbregex --enable-mbregex-backtrack \
--with-icu-dir=$AMPPS_PATH/icu69 \
--with-ssh2=shared,$AMPPS_PATH \
--enable-litespeed \
--with-webp=$AMPPS_PATH \
--with-snmp=shared,$AMPPS_PATH/snmp \
--with-pkgconfigdir=$AMPPS_PATH/lib/pkgconfig \
--with-iodbc=shared,$AMPPS_PATH \
--with-pdo-odbc=shared,unixODBC,$AMPPS_PATH \
--enable-sysvmsg \
--with-pspell=shared,$AMPPS_PATH/aspell \
--with-pdo-dblib=shared,$AMPPS_PATH \
--without-libzip \
--with-imap=shared,$AMPPS_PATH/lib/$imap \
--with-imap-ssl=shared,$AMPPS_PATH \
--with-password-argon2=/usr/local/apps/libargon2 \
--with-readline=shared,$AMPPS_PATH \
LIBS=-Wl,-rpath=$AMPPS_PATH/curl-7/lib:$AMPPS_PATH/openssl-30/lib:$AMPPS_PATH/snmp/lib:$AMPPS_PATH/lib && make && make install >> $LOG 2>&1
#--with-mcrypt=shared,$AMPPS_PATH \
#--with-sodium \
#--enable-zts \
mkdir $PATH_PHP81/ext/
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
#patchelf --set-rpath $AMPPS_PATH/lib:$AMPPS_PATH/snmp/lib $PATH_PHP81/bin/php
patchelf --add-needed libjpeg.so.9 $PATH_PHP81/ext/gd.so
fi
is_file $PATH_PHP81"/ext/pdo_mysql.so"
if [ $? == 0 ]
then
banner 'php 8.1 could not be installed due to some reason'
exit 1
fi
###########
# IONCUBE
###########
phpversion=`$PATH_PHP81/bin/php -r 'echo PHP_VERSION;'`
phpversion=${phpversion:0:3}
# Download the Module
wget -O $PATH_PHP81/ext/ioncube_loader_lin_$phpversion.so http://files.virtualizor.com/ioncube/$ARC/ioncube_loader_lin_$phpversion.so >> $LOG 2>&1
ioncube_loader_path=$PATH_PHP81/ext/ioncube_loader_lin_$phpversion.so
# Check if the file exists
if [ -e $ioncube_loader_path ]; then
# Check if the file size is greater than 0
if [ -s $ioncube_loader_path ]; then
echo "ionCube Loader file size is greater than 0 bytes."
else
echo "ionCube Loader file exists but has size 0 bytes."
echo 'IONCUBE could not be installed due to zero file size.'
exit 1
fi
else
echo "ionCube Loader file does not exist."
echo 'IONCUBE could not be installed due to some reason.'
exit 1
fi
##################
# SourceGuardian #
##################
cp /setups/sourceguardianloaders/ixed.$phpversion.lin $PATH_PHP81/ext/
is_file $PATH_PHP81"/ext/ixed.$phpversion.lin"
if [ $? == 0 ]
then
banner 'SourceGuardian could not be installed due to some reason'
exit 1
fi
rm -rf $PATH_PHP81/bin/fpmctl
cp /var/softaculous/apps/php81/build/src/bin/fpmctl81 $PATH_PHP81/bin
chmod 0755 $PATH_PHP81/bin/fpmctl81
chmod 0755 $PATH_PHP81/ext/ioncube_loader_lin_$phpversion.so
chmod 0755 $PATH_PHP81/ext/ixed.$phpversion.lin
mkdir $PATH_PHP81/etc/php.d
}
suphp81(){
is_file $PATH_PHP81"/lib/mod_suphp.so"
if [ $? == 0 ]
then
# Preapps
#php80
is_dir $SRC_PATH/$suphp
if [ $? == 0 ]
then
$SRC_PATH/$suphp
fi
PATH_SUPHP=$PATH_PHP81/suphp
remove_dir $suphp
banner "Installing suPHP"
cd $SRC_PATH
is_file $suphp.tar.gz
if [ $? == 0 ]
then
banner $suphp".tar.gz Downloading"
wget --no-check-certificate https://github.com/smarsching/suphp/releases/download/last/$suphp.tar.gz >> $LOG 2>&1
fi
tar -zxf $suphp.tar.gz
cd $suphp
PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
export PKG_CONFIG_PATH
./configure --prefix=$PATH_PHP81 --sysconfdir=$PATH_PHP81/etc --with-apr=$PATH_APACHE/bin/apr-1-config --with-apxs=$PATH_APACHE/bin/apxs --with-apache-user=nobody --with-setid-mode=paranoid --with-php=$PATH_PHP81/bin/php --with-logfile=$PATH_APACHE/logs/suphp80_log --enable-SUPHP_USE_USERGROUP=yes && make && make install >> $LOG 2>&1
mv $PATH_APACHE/modules/mod_suphp.so $PATH_PHP81/lib/
fi
is_file $PATH_PHP81"/lib/mod_suphp.so"
if [ $? == 0 ]
then
banner 'suPHP could not be installed due to some reason'
exit 1
fi
}
mod_php81_2() {
cp /var/softaculous/apps/php81/build/src/httpd.conf $PATH_APACHE2/etc/httpd.conf
#rm -rf $PATH_APACHE
rm -rf $SRC_PATH/$php81
is_file $PATH_PHP81"/apache2/lib/libphp.so"
if [ $? == 0 ]
then
# Libraries
#libtool
#libxml
# Preapps
#apache
#php53_cgi
remove_dir $php81
banner "Installing Mod_php 8.1"
cd $SRC_PATH
is_file $php81.tar.gz
if [ $? == 0 ]
then
banner $php81".tar.gz Downloading"
wget --no-check-certificate https://www.php.net/distributions/$php81.tar.gz >> $LOG 2>&1
fi
tar -zxf $php81.tar.gz
cd $php81
make distclean
PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
export PKG_CONFIG_PATH
LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$PATH_PHP81/apache2 \
--with-apxs2=$PATH_APACHE2/bin/apxs \
--with-config-file-path=$PATH_PHP81/etc \
--with-config-file-scan-dir=$PATH_PHP81/etc/php.d \
--includedir=$PATH_PHP81/include \
--libdir=$PATH_PHP81/lib \
--with-libxml-dir=$AMPPS_PATH && make && make install >> $LOG 2>&1
mkdir -p $PATH_PHP81/apache2/lib/
mv $PATH_APACHE2/modules/libphp.so $PATH_PHP81/apache2/lib/
fi
is_file $PATH_PHP81"/apache2/lib/libphp.so"
if [ $? == 0 ]
then
banner 'Mod PHP could not be installed due to some reason'
exit 1
fi
#rm -rf $PATH_APACHE2
rm -rf $PATH_APACHE2/etc/httpd.conf
rm -rf $PATH_APACHE2/etc/httpd.conf.bak
}
php81_libmemcached(){
is_file $PATH_PHP81"/lib/libmemcached.so"
if [ $? == 0 ]
then
banner "Installing libmemcached"
remove_dir $libmemcached
cd $SRC_PATH
is_file $libmemcached.tar.gz
if [ $? == 0 ]
then
banner $libmemcached".tar.gz Downloading"
wget --no-check-certificate https://launchpad.net/libmemcached/1.0/1.0.18/+download/$libmemcached.tar.gz >> $LOG 2>&1
fi
tar -zxf $libmemcached.tar.gz
cd $libmemcached
LDFLAGS="-L$AMPPS_PATH/lib" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$PATH_PHP81 && make && make install >> $LOG 2>&1
fi
is_file $PATH_PHP81"/lib/libmemcached.so"
if [ $? == 0 ]
then
banner 'libmemcached could not be installed due to some reason'
exit 1
fi
}
php81_memcached(){
remove_dir $php81_memcached
is_file $PATH_PHP81"/ext/memcached.so"
if [ $? == 0 ]
then
banner "Installing memcached module for PHP81"
cd $SRC_PATH
is_file $php81_memcached.tgz
if [ $? == 0 ]
then
banner $php81_memcached".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$php81_memcached.tgz >> $LOG 2>&1
fi
tar -zxf $php81_memcached.tgz
cd $php81_memcached
$PATH_PHP81/apache2/bin/phpize
PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
export PKG_CONFIG_PATH
LDFLAGS="-L$AMPPS_PATH/lib" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$PATH_PHP81 --with-php-config=$AMPPS_PATH"/php81/bin/php-config" --with-zlib-dir=$AMPPS_PATH --with-libmemcached-dir=$PATH_PHP81 --disable-memcached-sasl && make && export LD_LIBRARY_PATH=$AMPPS_PATH/lib && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/memcached.so"
if [ $? == 0 ]
then
banner 'php81_memcached could not compile with PHP81 due to some reason'
exit 1
fi
}
php81_mailparse(){
is_file $PATH_PHP81"/ext/mailparse.so"
if [ $? == 0 ]
then
# Libraries
#mbstring
banner "Installing mailparse for PHP81 "
cd $SRC_PATH
remove_dir $mailparse
is_file $mailparse.tgz
if [ $? == 0 ]
then
banner $mailparse".tar.gz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$mailparse.tgz >> $LOG 2>&1
fi
tar -zxf $mailparse.tgz
cd $mailparse
rm -rf mailparse.c
cp -f /var/softaculous/apps/php81/build/src/mods/mailparse.c ./mailparse.c
make distclean
$PATH_PHP81/apache2/bin/phpize
./configure --with-php-config=$PATH_PHP81/bin/php-config && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/mailparse.so"
if [ $? == 0 ]
then
banner 'mailparse could not compile with PHP81 due to some reason'
exit 1
fi
}
php81_imagick(){
is_file $PATH_PHP81"/ext/imagick.so"
if [ $? == 0 ]
then
banner "Installing imagick for PHP81 "
cd $SRC_PATH
remove_dir $imagick
is_file $imagick.tgz
if [ $? == 0 ]
then
banner $imagick".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$imagick.tgz >> $LOG 2>&1
fi
tar -zxf $imagick.tgz
cd $imagick
export LIBDIR=$AMPPS_PATH/lib
export LD_LIBRARY_PATH=$AMPPS_PATH/lib
export PKG_CONFIG_PATH=$PATH_IMAGICK/lib/pkgconfig
$PATH_PHP81/apache2/bin/phpize
./configure --prefix=$AMPPS_PATH --with-imagick=$PATH_IMAGICK --with-php-config=$PATH_PHP81/bin/php-config && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/imagick.so"
if [ $? == 0 ]
then
banner 'imagick could not compile with PHP81 due to some reason'
exit 1
fi
}
php81_libsodium(){
is_file $PATH_PHP81"/ext/sodium.so"
if [ $? == 0 ]
then
banner "Installing libsodium for PHP81 "
cd $SRC_PATH
remove_dir $sodium
is_file $sodium.tgz
if [ $? == 0 ]
then
banner $sodium".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$sodium.tgz >> $LOG 2>&1
fi
tar -zxf $sodium.tgz
cd $sodium
$PATH_PHP81/apache2/bin/phpize
PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
LDFLAGS="-L$AMPPS_PATH/lib" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$AMPPS_PATH --with-php-config=$PATH_PHP81"/bin/php-config" --with-sodium=$AMPPS_PATH && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/sodium.so"
if [ $? == 0 ]
then
banner 'sodium could not compile with PHP81 due to some reason'
exit 1
fi
}
php81_pgsql(){
remove_dir $php81
is_file $PATH_PHP81"/ext/pgsql.so"
if [ $? == 0 ]
then
#php81
banner "Installing pgsql for PHP81 "
cd $SRC_PATH
is_file $php81.tar.gz
if [ $? == 0 ]
then
banner $php81".tar.gz Downloading"
wget --no-check-certificate https://www.php.net/distributions/$php81.tar.gz >> $LOG 2>&1
fi
tar -zxf $php81.tar.gz
cd $php81/ext/pgsql
$PATH_PHP81/apache2/bin/phpize
LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --with-php-config=/usr/local/apps/php81/bin/php-config --with-pgsql=$PATH_PGSQL && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/pgsql.so"
if [ $? == 0 ]
then
banner 'pgsql could not compile with PHP81 due to some reason'
exit 1
fi
}
php81_pdo_pgsql(){
remove_dir $php81
is_file $PATH_PHP81"/ext/pdo_pgsql.so"
if [ $? == 0 ]
then
#php81
banner "Installing pdo_pgsql for PHP81 "
cd $SRC_PATH
is_file $php81.tar.gz
if [ $? == 0 ]
then
banner $php81".tar.gz Downloading"
wget --no-check-certificate https://www.php.net/distributions/$php81.tar.gz >> $LOG 2>&1
fi
tar -zxf $php81.tar.gz
cd $php81/ext/pdo_pgsql
$PATH_PHP81/apache2/bin/phpize
LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --with-php-config=/usr/local/apps/php81/bin/php-config --with-pdo-pgsql=$PATH_PGSQL --enable-shared && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/pdo_pgsql.so"
if [ $? == 0 ]
then
banner 'pdo_pgsql could not compile with PHP81 due to some reason'
exit 1
fi
}
mongo81(){
remove_dir $mongo
is_file $PATH_PHP81"/ext/mongodb.so"
if [ $? == 0 ]
then
#php81
banner "Installing Mongo for PHP81"
cd $SRC_PATH
is_file $mongo.tgz
if [ $? == 0 ]
then
banner $mongo".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$mongo.tgz >> $LOG 2>&1
fi
tar -zxf $mongo.tgz
cd $mongo
$PATH_PHP81/apache2/bin/phpize
./configure --with-php-config=$PATH_PHP81"/bin/php-config" && make all && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/mongodb.so"
if [ $? == 0 ]
then
banner 'Mongo could not compile with PHP81 due to some reason'
exit 1
fi
}
mod_varnish81(){
remove_dir $mod_varnish
is_file $PATH_PHP81"/ext/varnish.so"
if [ $? == 0 ]
then
#php81
banner "Installing varnish for PHP81"
cd $SRC_PATH
is_file $mod_varnish.tgz
if [ $? == 0 ]
then
banner $mod_varnish".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$mod_varnish.tgz >> $LOG 2>&1
fi
tar -zxf $mod_varnish.tgz
cd $mod_varnish
export PKG_CONFIG_PATH=$AMPPS_PATH/lib/pkgconfig:$AMPPS_PATH/varnish/lib/pkgconfig
$PATH_PHP81/apache2/bin/phpize
LDFLAGS="-L$AMPPS_PATH/lib" CPPFLAGS="-I$AMPPS_PATH/include" PKG_CONFIG_PATH="$AMPPS_PATH/lib/pkgconfig:$AMPPS_PATH/varnish/lib/pkgconfig" ./configure --with-php-config=$PATH_PHP81"/bin/php-config" --with-varnish=$AMPPS_PATH/varnish && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/varnish.so"
if [ $? == 0 ]
then
banner 'mod_varnish could not compile with PHP81 due to some reason'
exit 1
fi
}
php81_apcu(){
is_file $PATH_PHP81"/ext/apcu.so"
if [ $? == 0 ]
then
banner "Installing apcu for PHP81 "
cd $SRC_PATH
remove_dir $apcu
is_file $apcu.tgz
if [ $? == 0 ]
then
banner $apcu".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$apcu.tgz >> $LOG 2>&1
fi
tar -zxf $apcu.tgz
cd $apcu
$PATH_PHP81/apache2/bin/phpize
./configure --with-php-config=$PATH_PHP81/bin/php-config && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/apcu.so"
if [ $? == 0 ]
then
banner 'apcu could not compile with PHP81 due to some reason'
exit 1
fi
}
memcache81(){
remove_dir $memcache
is_file $PATH_PHP81"/ext/memcache.so"
if [ $? == 0 ]
then
#php81
banner "Installing Memcache for PHP81 "
cd $SRC_PATH
is_file $memcache.tgz
if [ $? == 0 ]
then
banner $memcache".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$memcache.tgz >> $LOG 2>&1
fi
tar -zxf $memcache.tgz
cd $memcache
$PATH_PHP81/apache2/bin/phpize
./configure --with-php-config=$PATH_PHP81"/bin/php-config" && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/memcache.so"
if [ $? == 0 ]
then
banner 'Memcache could not compile with PHP81 due to some reason'
exit 1
fi
}
php81_redis(){
is_file $PATH_PHP81"/ext/redis.so"
if [ $? == 0 ]
then
banner "Installing redis for PHP81 "
cd $SRC_PATH
remove_dir $phpredis
is_file $phpredis.tgz
if [ $? == 0 ]
then
banner $phpredis".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$phpredis.tgz >> $LOG 2>&1
fi
tar -zxf $phpredis.tgz
cd $phpredis
$PATH_PHP81/apache2/bin/phpize
./configure --with-php-config=$PATH_PHP81/bin/php-config --enable-redis-lzf --enable-redis-zstd --enable-redis-lz4 --enable-redis-igbinary --enable-redis-zstd --with-liblz4 && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/redis.so"
if [ $? == 0 ]
then
banner 'redis could not compile with PHP81 due to some reason'
exit 1
fi
}
php81_mcrypt(){
is_file $PATH_PHP81"/ext/mcrypt.so"
if [ $? == 0 ]
then
banner "Installing mcrypt for PHP81 "
cd $SRC_PATH
remove_dir $phpmcrypt
is_file $phpmcrypt.tgz
if [ $? == 0 ]
then
banner $phpmcrypt".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$phpmcrypt.tgz >> $LOG 2>&1
fi
tar -zxf $phpmcrypt.tgz
cd $phpmcrypt
$PATH_PHP81/apache2/bin/phpize
./configure --with-php-config=$PATH_PHP81/bin/php-config --with-mcrypt=shared,$AMPPS_PATH && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHP81"/ext/mcrypt.so"
if [ $? == 0 ]
then
banner 'mcrypt could not compile with PHP81 due to some reason'
exit 1
fi
}
php_brotli(){
is_file $PATH_PHPXX"/ext/brotli.so"
if [ $? == 0 ]
then
banner "Installing brotli for PHPXX "
cd $SRC_PATH
remove_dir php-ext-brotli
git clone --recursive --depth=1 https://github.com/kjdev/php-ext-brotli.git
cd php-ext-brotli
$PATH_PHPXX/apache2/bin/phpize
./configure --with-php-config=$PATH_PHPXX/bin/php-config && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHPXX
mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
fi
is_file $PATH_PHPXX"/ext/brotli.so"
if [ $? == 0 ]
then
banner 'brotli could not compile with PHPXX due to some reason'
exit 1
fi
}
php_dbase(){
is_file $PATH_PHPXX"/ext/dbase.so"
if [ $? == 0 ]
then
banner "Installing dbase for PHPXX "
cd $SRC_PATH
remove_dir $dbase
is_file $dbase.tgz
if [ $? == 0 ]
then
banner $dbase".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$dbase.tgz >> $LOG 2>&1
fi
tar -zxf $dbase.tgz
cd $dbase
$PATH_PHPXX/apache2/bin/phpize
./configure --with-php-config=$PATH_PHPXX/bin/php-config && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHPXX
mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
fi
is_file $PATH_PHPXX"/ext/dbase.so"
if [ $? == 0 ]
then
banner 'dbase could not compile with PHPXX due to some reason'
exit 1
fi
}
php_ext(){
prefix="php_"
is_file $PATH_PHPXX/ext/${1#"$prefix"}.so
if [ $? == 0 ]
then
banner "Installing "${1#"$prefix"}" for PHPXX"
cd $SRC_PATH
remove_dir "${!1}"
is_file ${!1}.tgz
if [ $? == 0 ]
then
banner ${!1}".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/${!1}.tgz >> $LOG 2>&1
fi
tar -zxf "${!1}".tgz
cd "${!1}"
export GEOIP_DIR=$AMPPS_PATH/geoip
export LUA_LIBS=$AMPPS_PATH/lua/lib
export LUA_CFLAGS=$AMPPS_PATH/lua/include
$PATH_PHPXX/apache2/bin/phpize
LDFLAGS="-L$AMPPS_PATH/lib" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --with-php-config=$PATH_PHPXX/bin/php-config $2 && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHPXX
mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
fi
is_file $PATH_PHPXX/ext/${1#"$prefix"}.so
if [ $? == 0 ]
then
banner $1' could not compile with PHPXX due to some reason'
exit 1
fi
}
php_sqlsrv(){
prefix="php_"
is_file $PATH_PHPXX/ext/${1#"$prefix"}.so
if [ $? == 0 ]
then
banner "Installing "${1#"$prefix"}" for PHPXX"
cd $SRC_PATH
remove_dir "${!1}"
is_file ${!1}.tgz
if [ $? == 0 ]
then
banner ${!1}".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/${!1}.tgz >> $LOG 2>&1
fi
tar -zxf "${!1}".tgz
cd "${!1}"
$PATH_PHPXX/apache2/bin/phpize
LDFLAGS="-L$AMPPS_PATH/libodbc/lib" CPPFLAGS="-I$AMPPS_PATH/libodbc/include" ./configure --with-php-config=$PATH_PHPXX/bin/php-config --with-libdir=$AMPPS_PATH/libodbc $2 && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHPXX
mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
fi
is_file $PATH_PHPXX/ext/${1#"$prefix"}.so
if [ $? == 0 ]
then
banner $1' could not compile with PHPXX due to some reason'
exit 1
fi
}
php_pdf(){
is_file $PATH_PHPXX"/ext/pdf.so"
if [ $? == 0 ]
then
banner "Installing pdf for PHPXX "
cd $SRC_PATH
remove_dir $pdflib
is_file $pdflib.tar.gz
if [ $? == 0 ]
then
banner $pdflib".tar.gz Downloading"
wget --no-check-certificate https://www.pdflib.com/binaries/PDFlib/940/$pdflib.tar.gz >> $LOG 2>&1
fi
tar -xvf $pdflib.tar.gz
remove_dir $php_pdf
is_file $php_pdf.tgz
if [ $? == 0 ]
then
banner $php_pdf".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$php_pdf.tgz >> $LOG 2>&1
fi
tar -zxf $php_pdf.tgz
cd $php_pdf
$PATH_PHPXX/apache2/bin/phpize
./configure --with-php-config=$PATH_PHPXX/bin/php-config --with-pdflib=$SRC_PATH/$pdflib/bind/c && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHPXX
mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
fi
is_file $PATH_PHPXX"/ext/pdf.so"
if [ $? == 0 ]
then
banner 'pdf could not compile with PHPXX due to some reason'
exit 1
fi
}
php_newrelic(){
is_file $PATH_PHPXX"/ext/newrelic.so"
if [ $? == 0 ]
then
banner "Installing newrelic for $PATH_PHPXX"
cd $SRC_PATH
remove_dir $newrelic
is_file $newrelic.tar.gz
if [ $? == 0 ]
then
banner $newrelic".tar.gz Downloading"
wget --no-check-certificate https://download.newrelic.com/php_agent/archive/10.15.0.4/newrelic-php5-10.15.0.4-linux.tar.gz >> $LOG 2>&1
fi
tar -zxf $newrelic.tar.gz
cd $newrelic
getExtensionDir $PATH_PHPXX
newrelic_zts='-zts';
if echo $ExtensionDir | grep 'non-zts'; then
newrelic_zts='';
fi
php_api=`echo $ExtensionDir | grep -P [0-9]\{8} -o`
mv agent/x64/newrelic-${php_api}${newrelic_zts}.so $PATH_PHPXX/ext/newrelic.so
fi
is_file $PATH_PHPXX"/ext/newrelic.so"
if [ $? == 0 ]
then
banner 'newrelic could not move due to some reason'
fi
}
php81_ssh2(){
is_file $PATH_PHPXX"/ext/ssh2.so"
if [ $? == 0 ]
then
# Libraries
#mbstring
banner "Installing ssh2 for php81 "
cd $SRC_PATH
remove_dir $ssh2
is_file $ssh2.tgz
if [ $? == 0 ]
then
banner $ssh2".tar.gz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$ssh2.tgz >> $LOG 2>&1
fi
tar -zxf $ssh2.tgz
cd $ssh2
make distclean
export LIBSSH2_LIBS="-L$AMPPS_PATH/lib -lssh2"
export LIBSSH2_CFLAGS="-I$AMPPS_PATH/include"
$PATH_PHPXX/apache2/bin/phpize
LDFLAGS="-L$AMPPS_PATH/lib -lssh2" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --with-ssh2=shared,$AMPPS_PATH/ --with-php-config=$PATH_PHPXX/bin/php-config && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHPXX
mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
fi
is_file $PATH_PHPXX"/ext/ssh2.so"
if [ $? == 0 ]
then
banner 'ssh2 could not compile with php81 due to some reason'
exit 1
fi
}
php_zstd(){
is_file $PATH_PHPXX"/ext/zstd.so"
if [ $? == 0 ]
then
banner "Installing Zstd for PHPXX "
cd $SRC_PATH
remove_dir $zstd
is_file $zstd.tgz
if [ $? == 0 ]
then
banner $zstd".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$zstd.tgz >> $LOG 2>&1
fi
tar -zxf $zstd.tgz
cd $zstd
$PATH_PHPXX/apache2/bin/phpize
./configure --with-php-config=$PATH_PHPXX/bin/php-config && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHPXX
mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
fi
is_file $PATH_PHPXX"/ext/zstd.so"
if [ $? == 0 ]
then
banner 'zstd could not compile with PHPXX due to some reason'
exit 1
fi
}
php_igbinary(){
is_file $PATH_PHPXX"/ext/igbinary.so"
if [ $? == 0 ]
then
banner "Installing igbinary for PHPXX "
cd $SRC_PATH
remove_dir $igbinary
is_file $igbinary.tgz
if [ $? == 0 ]
then
banner $igbinary".tgz Downloading"
wget --no-check-certificate https://pecl.php.net/get/$igbinary.tgz >> $LOG 2>&1
fi
tar -zxf $igbinary.tgz
cd $igbinary
$PATH_PHPXX/apache2/bin/phpize
./configure --with-php-config=$PATH_PHPXX/bin/php-config && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHPXX
mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
fi
is_file $PATH_PHPXX"/ext/igbinary.so"
if [ $? == 0 ]
then
banner 'igbinary could not compile with PHPXX due to some reason'
exit 1
fi
}
php_xmlrpc(){
remove_dir $php81
is_file $PATH_PHPXX"/ext/xmlrpc.so"
if [ $? == 0 ]
then
#php73
banner "Installing xmlrpc for PH81"
cd $SRC_PATH
is_file $php81.tar.gz
if [ $? == 0 ]
then
banner $php81".tar.gz Downloading"
wget --no-check-certificate -O $SRC_PATH/$php81.tar.gz https://www.php.net/distributions/$php81.tar.gz >> $LOG 2>&1
fi
tar -zxf $php81.tar.gz
cd $php81/ext/xmlrpc
PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
export PKG_CONFIG_PATH
PHP_AUTOCONF=/usr/local/bin/autoconf
export PHP_AUTOCONF
$PATH_PHPXX/apache2/bin/phpize
LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --with-php-config=/usr/local/apps/php81/bin/php-config --with-libdir=$AMPPS_PATH/lib/ --with-xmlrpc --with-libxml-dir=$AMPPS_PATH --with-iconv-dir=$AMPPS_PATH && make && make install >> $LOG 2>&1
getExtensionDir $PATH_PHP81
mv $ExtensionDir/{*.a,*.so} $PATH_PHP81/ext/
fi
is_file $PATH_PHPXX"/ext/xmlrpc.so"
if [ $? == 0 ]
then
banner 'xmlrpc could not compile with PHP81 due to some reason'
exit 1
fi
}
getExtensionDir()
{
ExtensionDir=`grep 'extension_dir=' $1/bin/php-config | sed 's/^extension_dir=.//;s/.$//'`
}
PATH_PHPXX=$PATH_PHP81
php81_cgi
#mod_php81
php81
#suphp81
mod_php81_2
#suphp81_2
#php81_xmlrpc #xmlrpc removed in php 8.1
php81_libmemcached
php81_memcached
php81_mailparse
php81_imagick
php81_libsodium
php81_pgsql
php81_pdo_pgsql
mongo81
mod_varnish81
php81_apcu
memcache81
php_zstd
php_igbinary
php81_redis
php81_mcrypt
php_brotli
php_dbase
#php_ext eio
#php_ext enchant
#php_ext fileinfo
#php_ext gender
#php_ext php_geoip
#-------------------------
#php_ext gnupg
#php_ext grpc
php_ext raphf
#php_ext propro
#php_http
#php_ext couchbase
php_ext inotify
#php_ext leveldb
#php_ext luasandbox
php_ext lzf
#php_ext oci8
#php_pdf
php_ext yaml --with-yaml=/usr/local/apps/
php_ext xdebug
php_ext uuid --with-uuid=/usr/local/apps/
php_ext uploadprogress
php_ext trader
php_ext timezonedb
#php_ext swoole
#php_ext stats
php_sqlsrv sqlsrv
php_sqlsrv pdo_sqlsrv
php_ext geospatial
php_ext gmagick --with-gmagick=/usr/local/apps/GraphicsMagick
#php_ext vips
php_newrelic
php81_ssh2
#php_xmlrpc