Current File : /home/inlingua/public_html/decay_sym/root/var/softaculous/apps/php74/build/make.sh
#!/bin/bash
source /var/softaculous/apps/build/common.sh

PATH_PHP74=$AMPPS_PATH/php74
php74=php-7.4.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
PATH_PHP71=$AMPPS_PATH/php71
libmemcached=libmemcached-1.0.18
php74_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
memcache=memcache-8.2
phpredis=redis-5.3.7
phpmcrypt=mcrypt-1.0.5
apcu=apcu-5.1.22
dbase=dbase-7.1.1
http=pecl_http-3.2.3
pdflib=PDFlib-9.4.0-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
pdo_firebird=PDO_FIREBIRD-0.2
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
newrelic=newrelic-php5-10.3.0.315-linux
PATH_PHPXX="";
ssh2=ssh2-1.4.1
zstd=zstd-0.13.1
igbinary=igbinary-3.2.14
zstd=zstd-0.14.0

getExtensionDir()
{
    ExtensionDir=`grep 'extension_dir=' $1/bin/php-config | sed 's/^extension_dir=.//;s/.$//'`
}

php74_cgi() {	
	
	is_file $PATH_PHP74"/bin/php-cgi"
	if [ $? == 0 ]	
	then
		
		# Libraries
		#libtool
		#libxml
		
		# Preapps
		#apache		
		
		remove_dir $php74		
		banner "Installing PHP-CGI 7.4"
		cd $SRC_PATH
		is_file $php74.tar.gz
		if [ $? == 0 ]
		then
			banner $php74".tar.gz Downloading"
			#wget --no-check-certificate -O $SRC_PATH/$php74.tar.gz https://www.php.net/distributions/$php74.tar.gz >> $LOG 2>&1
			
			git clone --branch PHP-7.4-security-backports https://github.com/remicollet/php-src-security.git php-7.4.33

		fi	
		#tar -zxf $php74.tar.gz
		cd $php74
		make distclean
		PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
		export PKG_CONFIG_PATH
		PHP_AUTOCONF=/usr/local/bin/autoconf
		export PHP_AUTOCONF
		./buildconf --force
		LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$PATH_PHP74 \
		--with-config-file-path=$PATH_PHP74/etc \
		--with-config-file-scan-dir=$PATH_PHP74/etc/php.d \
		--includedir=$PATH_PHP74/include \
		--libdir=$PATH_PHP74/lib \
		--enable-opcache=no \
		--with-libxml-dir=$AMPPS_PATH && make && make install >> $LOG 2>&1		
	fi
	is_file $PATH_PHP74"/bin/php-cgi"
	if [ $? == 0 ]
	then
		banner 'php-cgi 7.4 could not be installed due to some reason'
		exit 1
	fi
	
}

mod_php74() {

	is_file $PATH_PHP74"/lib/libphp7.so"
	if [ $? == 0 ]	
	then
		
		# Libraries

		#libtool
		#libxml	
		
		# Preapps
		#apache	
		#php56_cgi
		
		remove_dir $php74
	
		banner "Installing Mod_PHP 7.4"
		cd $SRC_PATH
		is_file $php74.tar.gz
		if [ $? == 0 ]
		then
			banner $php74".tar.gz Downloading"
			#wget --no-check-certificate -O $SRC_PATH/$php74.tar.gz https://www.php.net/distributions/$php74.tar.gz >> $LOG 2>&1
			git clone --branch PHP-7.4-security-backports https://github.com/remicollet/php-src-security.git php-7.4.33
		fi	
		#tar -zxf $php74.tar.gz
		cd $php74
		make distclean	
		PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
		export PKG_CONFIG_PATH
		./buildconf --force
		LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$PATH_PHP74 \
		--with-apxs2=$PATH_APACHE/bin/apxs \
		--with-config-file-path=$PATH_PHP74/etc \
		--with-config-file-scan-dir=$PATH_PHP74/etc/php.d \
		--includedir=$PATH_PHP74/include \
		--libdir=$PATH_PHP74/lib \
		--enable-opcache=no \
		--with-libxml-dir=$AMPPS_PATH && make && make install >> $LOG 2>&1
		
		mv $PATH_APACHE/modules/libphp7.so $PATH_PHP74/lib/
		
	fi
	is_file $PATH_PHP74"/lib/libphp7.so"
	if [ $? == 0 ]
	then
		banner 'Mod PHP could not be installed due to some reason'
		exit 1
	fi
}

php74() {

	is_file $PATH_PHP74"/ext/pdo_mysql.so"
	if [ $? == 0 ]
	then

		# Libraries
		#libtool
		#curl
		#bzip
		#sqlite
		#xslt
		#mcrypt
		#gdbm
		#gd
		#freetds
		#gettext
		#libxml
		#libssh
		
		# Pre
		#mysql
		#php73_cgi
		#mod_php73
		
		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 $php74
		
		banner "Installing PHP 7.4"
		cd $SRC_PATH
		is_file $php74.tar.gz
		if [ $? == 0 ]
		then
			banner $php74".tar.gz Downloading"
			#wget --no-check-certificate -O $SRC_PATH/$php74.tar.gz https://www.php.net/distributions/$php74.tar.gz >> $LOG 2>&1
			git clone --branch PHP-7.4-security-backports https://github.com/remicollet/php-src-security.git php-7.4.33
		fi	
		#tar -zxf $php74.tar.gz
		cd $php74
		make distclean
		
		#ssh2
		
		banner $AMPPS_PATH
		#		--with-apxs2=$AMPPS_PATH/bin/apxs

		export PKG_CONFIG_PATH=/usr/local/apps/openssl-11/lib/pkgconfig:/usr/local/apps/curl-7/lib/pkgconfig:/usr/local/apps/icu69/lib/pkgconfig:/usr/local/apps/snmp/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 LIBZIP_CFLAGS ="-I$AMPPS_PATH/include"
		export LIBZIP_LIBS ="-L$AMPPS_PATH/lib"

		./buildconf --force
		LDFLAGS="-L$AMPPS_PATH/openssl-11/lib -L$AMPPS_PATH/snmp/lib -L$AMPPS_PATH/curl-7/lib -L$AMPPS_PATH/lib -liconv -L/usr/local/apps/libargon2/lib -largon2"/
		CPPFLAGS="-I$AMPPS_PATH/openssl-11/include -L$AMPPS_PATH/snmp/include -I$AMPPS_PATH/curl-7/include -I$AMPPS_PATH/include" /
		./configure --prefix=$PATH_PHP74 \
		--with-config-file-path=$PATH_PHP74/etc \
		--with-config-file-scan-dir=$PATH_PHP74/etc/php.d \
		--includedir=$PATH_PHP74/include \
		--libdir=$PATH_PHP74/lib \
		--enable-opcache=no \
		--with-jpeg \
		--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 \
		--enable-zts \
		--without-gdbm \
		--enable-xslt=$AMPPS_PATH \
		--with-xsl=shared,$AMPPS_PATH \
		--with-tidy=shared,$AMPPS_PATH \
		--with-pear=shared,$PATH_PHP74/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 \
		--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-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 \
		--with-imap=shared,$AMPPS_PATH/lib/$imap \
		--with-imap-ssl=shared,$AMPPS_PATH/openssl-11 \
		--with-pgsql=shared,$PATH_PGSQL  \
		--with-pdo-pgsql=shared,$PATH_PGSQL \
		--without-kerberos \
		--with-pdf=shared \
		--enable-phar \
		--enable-mailparse \
		--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 \
		--with-pkgconfigdir=$AMPPS_PATH/lib/pkgconfig \
		--with-openssl=shared,$AMPPS_PATH/openssl-11 \
		--with-openssl-dir=$AMPPS_PATH/openssl-11 \
		--enable-litespeed \
		--with-webp=$AMPPS_PATH \
		--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 \
		--with-snmp=shared,$AMPPS_PATH/snmp \
		--with-password-argon2=/usr/local/apps/libargon2 \
		--with-readline=shared,$AMPPS_PATH \
		LIBS=-Wl,-rpath=$AMPPS_PATH/curl-7/lib:$AMPPS_PATH/openssl-11/lib:$AMPPS_PATH/snmp/lib:$AMPPS_PATH/lib \
		&& make && make install >> $LOG 2>&1
		
		mkdir $PATH_PHP74/ext/		

		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
		
		#patchelf  --set-rpath $AMPPS_PATH/lib:$AMPPS_PATH/snmp/lib $PATH_PHP74/bin/php
		patchelf --add-needed libjpeg.so.9 $PATH_PHP74/ext/gd.so
		
	fi
	is_file $PATH_PHP74"/ext/pdo_mysql.so"
	if [ $? == 0 ]
	then
		banner 'php 7.4 could not be installed due to some reason'
		exit 1
	fi
	
	###########
	# IONCUBE
	###########
	
	phpversion=`$PATH_PHP74/bin/php -r 'echo PHP_VERSION;'`
	phpversion=${phpversion:0:3}
	
	# Download the Module
	wget -O $PATH_PHP74/ext/ioncube_loader_lin_$phpversion.so  http://files.virtualizor.com/ioncube/$ARC/ioncube_loader_lin_$phpversion.so >> $LOG 2>&1
	
	ioncube_loader_path=$PATH_PHP74/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_PHP74/ext/
	
	is_file $PATH_PHP74"/ext/ixed.$phpversion.lin"
	if [ $? == 0 ]
	then
		banner 'SourceGuardian could not be installed due to some reason'
		exit 1
	fi
	
	rm -rf $PATH_PHP74/bin/fpmctl
	cp $APPS_PATH/php74/build/src/bin/fpmctl73 $PATH_PHP74/bin
	chmod 0755 $PATH_PHP74/bin/fpmctl73
	chmod 0755 $PATH_PHP74/ext/ioncube_loader_lin_$phpversion.so
	chmod 0755 $PATH_PHP74/ext/ixed.$phpversion.lin
	
	mkdir $PATH_PHP74/etc/php.d
	
}

suphp74(){

	is_file $PATH_PHP74"/lib/mod_suphp.so"
	if [ $? == 0 ]
	then
		
		# Preapps
		#php73
		
		is_dir $SRC_PATH/$suphp
		if [ $? == 0 ]
		then
			$SRC_PATH/$suphp
		fi
		
		PATH_SUPHP=$PATH_PHP74/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 -O $SRC_PATH/$suphp.tar.gz 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_PHP74 --sysconfdir=$PATH_PHP74/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_PHP74/bin/php --with-logfile=$PATH_APACHE/logs/suphp73_log --enable-SUPHP_USE_USERGROUP=yes && make && make install >> $LOG 2>&1
	
		mv $PATH_APACHE/modules/mod_suphp.so $PATH_PHP74/lib/
	
	fi
	is_file $PATH_PHP74"/lib/mod_suphp.so"
	if [ $? == 0 ]
	then
		banner 'suPHP could not be installed due to some reason'
		exit 1
	fi
}

mod_php74_2() {

	cp $APPS_PATH/apache2/build/src/bin/httpd.conf $PATH_APACHE2/etc/httpd.conf
	
	#rm -rf $PATH_APACHE
	rm -rf $SRC_PATH/$php74

	is_file $PATH_PHP74"/apache2/lib/libphp7.so"
	if [ $? == 0 ]	
	then
		
		# Libraries
		#libtool
		#libxml	
		
		# Preapps
		#apache	
		#php53_cgi		
		remove_dir $php74
		banner "Installing Mod_php 7.4"
		cd $SRC_PATH
		is_file $php74.tar.gz
		if [ $? == 0 ]
		then
			banner $php74".tar.gz Downloading"
			#wget --no-check-certificate -O $SRC_PATH/$php74.tar.gz /https://www.php.net/distributions/$php74.tar.gz >> $LOG 2>&1
			git clone --branch PHP-7.4-security-backports https://github.com/remicollet/php-src-security.git php-7.4.33
		fi	
		#tar -zxf $php74.tar.gz
		cd $php74
		make distclean	
		PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
		export PKG_CONFIG_PATH
		./buildconf --force
		LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --prefix=$PATH_PHP74/apache2 \
		--with-apxs2=$PATH_APACHE2/bin/apxs \
		--with-config-file-path=$PATH_PHP74/etc \
		--with-config-file-scan-dir=$PATH_PHP74/etc/php.d \
		--includedir=$PATH_PHP74/include \
		--libdir=$PATH_PHP74/lib \
		--with-libxml-dir=$AMPPS_PATH && make && make install >> $LOG 2>&1
		
		mkdir -p $PATH_PHP74/apache2/lib/
		mv $PATH_APACHE2/modules/libphp7.so $PATH_PHP74/apache2/lib/
		
	fi
	is_file $PATH_PHP74"/apache2/lib/libphp7.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
}

php74_xmlrpc(){
	
	remove_dir $php74
	is_file $PATH_PHP74"/ext/xmlrpc.so"
	if [ $? == 0 ]
	then
		#php73
		banner "Installing xmlrpc for PHP74"
		cd $SRC_PATH
		is_file $php74.tar.gz
		if [ $? == 0 ]
		then
			banner $php74".tar.gz Downloading"
			#wget --no-check-certificate -O $SRC_PATH/$php74.tar.gz https://www.php.net/distributions/$php74.tar.gz >> $LOG 2>&1
			git clone --branch PHP-7.4-security-backports https://github.com/remicollet/php-src-security.git php-7.4.33
		fi	
		#tar -zxf $php74.tar.gz
		cd $php74/ext/xmlrpc
		PKG_CONFIG_PATH=/usr/local/apps/lib/pkgconfig
		export PKG_CONFIG_PATH
		PHP_AUTOCONF=/usr/local/bin/autoconf
		export PHP_AUTOCONF
		$PATH_PHP74/apache2/bin/phpize
		./buildconf --force
 		LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --with-php-config=/usr/local/apps/php74/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_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
	fi
	
	is_file $PATH_PHP74"/ext/xmlrpc.so"
	if [ $? == 0 ]
	then
		banner 'xmlrpc could not compile with PHP74 due to some reason'
		exit 1
	fi

}

php74_libmemcached(){

	is_file $PATH_PHP74"/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 -O $SRC_PATH/$libmemcached.tar.gz 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_PHP74 && make && make install >> $LOG 2>&1
		
	fi
	is_file $PATH_PHP74"/lib/libmemcached.so"
	if [ $? == 0 ]
	then
		banner 'libmemcached could not be installed due to some reason'
		exit 1
	fi	
}

php74_memcached(){
	remove_dir $php74_memcached
	is_file $PATH_PHP74"/ext/memcached.so"
	if [ $? == 0 ]
	then
		banner "Installing memcached module for PHP74"
		cd $SRC_PATH
		is_file $php74_memcached.tgz
		if [ $? == 0 ]
		then
			banner $php74_memcached".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$php74_memcached.tgz https://pecl.php.net/get/$php74_memcached.tgz >> $LOG 2>&1
		fi
		
		tar -zxf $php74_memcached.tgz
		cd $php74_memcached
		 $PATH_PHP74/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_PHP73 --with-php-config=$AMPPS_PATH"/php74/bin/php-config" --with-zlib-dir=$AMPPS_PATH --with-libmemcached-dir=$PATH_PHP74 --disable-memcached-sasl && make && export LD_LIBRARY_PATH=$AMPPS_PATH/lib && make install >> $LOG 2>&1
		
		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
		
	fi
	
	is_file $PATH_PHP74"/ext/memcached.so"
	if [ $? == 0 ]
	then
		banner 'php74_memcached could not compile with PHP74 due to some reason'
		exit 1
	fi	
}

php74_mailparse(){

	is_file $PATH_PHP74"/ext/mailparse.so"
	if [ $? == 0 ]
	then

		# Libraries
		#mbstring
		
		banner "Installing mailparse for PHP74 "
		cd $SRC_PATH
		remove_dir $mailparse
		is_file $mailparse.tgz
		if [ $? == 0 ]
		then
			banner $mailparse".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$mailparse.tgz https://pecl.php.net/get/$mailparse.tgz >> $LOG 2>&1
		fi
		tar -zxf $mailparse.tgz
		cd $mailparse
		
		rm -rf mailparse.c
		cp -f $APPS_PATH/php74/build/src/mods/mailparse.c ./mailparse.c
		
		make distclean
		
		 $PATH_PHP74/apache2/bin/phpize
		./configure --with-php-config=$PATH_PHP74/bin/php-config && make && make install >> $LOG 2>&1
		
		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
	fi
	
	is_file $PATH_PHP74"/ext/mailparse.so"
	if [ $? == 0 ]
	then
		banner 'mailparse could not compile with PHP74 due to some reason'
		exit 1
	fi

}

php74_imagick(){

	is_file $PATH_PHP74"/ext/imagick.so"
	if [ $? == 0 ]
	then
		banner "Installing imagick for PHP74 "
		cd $SRC_PATH
		remove_dir $imagick
		is_file $imagick.tgz
		if [ $? == 0 ]
		then
			banner $imagick".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$imagick.tgz 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_PHP74/apache2/bin/phpize
		./configure --prefix=$AMPPS_PATH --with-imagick=$PATH_IMAGICK --with-php-config=$PATH_PHP74/bin/php-config && make && make install >> $LOG 2>&1
		
		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
		
	fi
	
	is_file $PATH_PHP74"/ext/imagick.so"
	if [ $? == 0 ]
	then
		banner 'imagick could not compile with PHP74 due to some reason'
		exit 1
	fi

}

php74_libsodium(){

	is_file $PATH_PHP74"/ext/sodium.so"
	if [ $? == 0 ]
	then
		banner "Installing libsodium for PHP74 "
		cd $SRC_PATH
		remove_dir $sodium
		is_file $sodium.tgz
		if [ $? == 0 ]
		then
			banner $sodium".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$sodium.tgz https://pecl.php.net/get/$sodium.tgz >> $LOG 2>&1
		fi
		tar -zxf $sodium.tgz
		cd $sodium
		 $PATH_PHP74/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_PHP74"/bin/php-config" --with-sodium=$AMPPS_PATH && make && make install >> $LOG 2>&1
		
		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
		
	fi
	is_file $PATH_PHP74"/ext/sodium.so"
	if [ $? == 0 ]
	then
		banner 'sodium could not compile with PHP74 due to some reason'
		exit 1
	fi
}

php74_pgsql(){
	
	remove_dir $php74
	
	is_file $PATH_PHP74"/ext/pgsql.so"
	if [ $? == 0 ]
	then
		#php74
		banner "Installing pgsql for PHP74 "
		cd $SRC_PATH
		is_file $php74.tar.gz
		if [ $? == 0 ]
		then
			banner $php74".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$php74.tar.gz https://www.php.net/distributions/$php74.tar.gz>> $LOG 2>&1
		fi	
		tar -zxf $php74.tar.gz
		cd $php74/ext/pgsql
		 $PATH_PHP74/apache2/bin/phpize
		LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --with-php-config=/usr/local/apps/php74/bin/php-config --with-pgsql=$PATH_PGSQL && make && make install >> $LOG 2>&1
		
		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
	fi
	
	is_file $PATH_PHP74"/ext/pgsql.so"
	if [ $? == 0 ]
	then
		banner 'pgsql could not compile with PHP74 due to some reason'
		exit 1
	fi

}

php74_pdo_pgsql(){

	remove_dir $php74
	
	is_file $PATH_PHP74"/ext/pdo_pgsql.so"
	if [ $? == 0 ]
	then

		#php74
		
		banner "Installing pdo_pgsql for PHP74 "
		cd $SRC_PATH
		is_file $php74.tar.gz
		if [ $? == 0 ]
		then
			banner $php74".tar.gz Downloading"
			#wget --no-check-certificate -O $SRC_PATH/$php74.tar.gz https://www.php.net/distributions/$php74.tar.gz>> $LOG 2>&1
			git clone --branch PHP-7.4-security-backports https://github.com/remicollet/php-src-security.git php-7.4.33
		fi
		#tar -zxf $php74.tar.gz
		cd $php74/ext/pdo_pgsql
		$PATH_PHP74/apache2/bin/phpize
		./buildconf --force
		LDFLAGS="-L$AMPPS_PATH/lib -liconv" CPPFLAGS="-I$AMPPS_PATH/include" ./configure --with-php-config=/usr/local/apps/php74/bin/php-config --with-pdo-pgsql=$PATH_PGSQL --enable-shared && make && make install >> $LOG 2>&1

		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
	fi
	
	is_file $PATH_PHP74"/ext/pdo_pgsql.so"
	if [ $? == 0 ]
	then
		banner 'pdo_pgsql could not compile with PHP74 due to some reason'
		exit 1
	fi

}

mongo74(){
	
	remove_dir $mongo
	is_file $PATH_PHP74"/ext/mongodb.so"
	if [ $? == 0 ]
	then
	
		#php74
		
		banner "Installing Mongo for PHP74"
		cd $SRC_PATH
		is_file $mongo.tgz
		if [ $? == 0 ]
		then
			banner $mongo".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$mongo.tgz https://pecl.php.net/get/$mongo.tgz >> $LOG 2>&1
		fi	
		tar -zxf $mongo.tgz
		cd $mongo
		$PATH_PHP74/apache2/bin/phpize
		./configure --with-php-config=$PATH_PHP74"/bin/php-config" && make all && make install >> $LOG 2>&1

		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
	fi
	
	is_file $PATH_PHP74"/ext/mongodb.so"
	if [ $? == 0 ]
	then
		banner 'Mongo could not compile with PHP74 due to some reason'
		exit 1
	fi
	
}

mod_varnish74(){

	remove_dir $mod_varnish
		
	is_file $PATH_PHP74"/ext/varnish.so"
	if [ $? == 0 ]
	then

		#php74
		
		banner "Installing varnish for PHP74"
		cd $SRC_PATH
		is_file $mod_varnish.tgz
		if [ $? == 0 ]
		then
			banner $mod_varnish".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$mod_varnish.tgz 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_PHP74/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_PHP74"/bin/php-config" --with-varnish=$AMPPS_PATH/varnish && make && make install >> $LOG 2>&1

		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
	fi
	
	is_file $PATH_PHP74"/ext/varnish.so"
	if [ $? == 0 ]
	then
		banner 'mod_varnish could not compile with PHP74 due to some reason'
		exit 1
	fi

}

memcache74(){

	remove_dir $memcache
		
	is_file $PATH_PHP74"/ext/memcache.so"
	if [ $? == 0 ]
	then

		#php74
		
		banner "Installing Memcache for PHP74 "
		cd $SRC_PATH
		is_file $memcache.tgz
		if [ $? == 0 ]
		then
			banner $memcache".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$memcache.tgz https://pecl.php.net/get/$memcache.tgz >> $LOG 2>&1
		fi
		tar -zxf $memcache.tgz
		cd $memcache
		$PATH_PHP74/apache2/bin/phpize
		./configure --with-php-config=$PATH_PHP74"/bin/php-config" && make && make install >> $LOG 2>&1

		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
	fi
	
	is_file $PATH_PHP74"/ext/memcache.so"
	if [ $? == 0 ]
	then
		banner 'Memcache could not compile with PHP74 due to some reason'
		exit 1
	fi

}

php74_redis(){

	is_file $PATH_PHP74"/ext/redis.so"
	if [ $? == 0 ]
	then
		banner "Installing redis for PHP74 "
		cd $SRC_PATH
		remove_dir $phpredis
		is_file $phpredis.tgz
		if [ $? == 0 ]
		then
			banner $phpredis".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$phpredis.tgz https://pecl.php.net/get/$phpredis.tgz >> $LOG 2>&1
		fi	
		tar -zxf $phpredis.tgz
		cd $phpredis
		$PATH_PHP74/apache2/bin/phpize
		./configure --with-php-config=$PATH_PHP74/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_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
		
	fi
	
	is_file $PATH_PHP74"/ext/redis.so"
	if [ $? == 0 ]
	then
		banner 'redis could not compile with PHP74 due to some reason'
		exit 1
	fi

}

php74_mcrypt(){

	is_file $PATH_PHP74"/ext/mcrypt.so"
	if [ $? == 0 ]
	then
		banner "Installing mcrypt for PHP74 "
		cd $SRC_PATH
		remove_dir $phpmcrypt
		is_file $phpmcrypt.tgz
		if [ $? == 0 ]
		then
			banner $phpmcrypt".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$phpmcrypt.tgz https://pecl.php.net/get/$phpmcrypt.tgz >> $LOG 2>&1
		fi
		tar -zxf $phpmcrypt.tgz
		cd $phpmcrypt
		$PATH_PHP74/apache2/bin/phpize
		./configure --with-php-config=$PATH_PHP74/bin/php-config --with-mcrypt=shared,$AMPPS_PATH && make && make install >> $LOG 2>&1
		
		getExtensionDir $PATH_PHP74
		mv $ExtensionDir/{*.a,*.so} $PATH_PHP74/ext/
		
	fi
	
	is_file $PATH_PHP74"/ext/mcrypt.so"
	if [ $? == 0 ]
	then
		banner 'mcrypt could not compile with PHP74 due to some reason'
		exit 1
	fi
}

php_apcu(){

	is_file $PATH_PHPXX"/ext/apcu.so"
	if [ $? == 0 ]
	then
		banner "Installing apcu for PHPXX "
		cd $SRC_PATH
		remove_dir $apcu
		is_file $apcu.tgz
		if [ $? == 0 ]
		then
			banner $apcu".tar.gz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$apcu.tgz https://pecl.php.net/get/$apcu.tgz >> $LOG 2>&1
		fi
		tar -zxf $apcu.tgz
		cd $apcu
		$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/apcu.so"
	if [ $? == 0 ]
	then
		banner 'apcu could not compile with PHPXX 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 -O $SRC_PATH/$dbase.tgz 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_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_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 -O $SRC_PATH/${!1}.tgz https://pecl.php.net/get/${!1}.tgz >> $LOG 2>&1
		fi
		tar -zxf "${!1}".tgz
		cd "${!1}"
		
		export GEOIP_DIR=$AMPPS_PATH/geoip
		
		$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_http(){

	is_file $PATH_PHPXX"/ext/http.so"
	if [ $? == 0 ]
	then
		banner "Installing http for PHPXX "
		cd $SRC_PATH
		
		getExtensionDir $PATH_PHPXX
		
		cp $PATH_PHPXX/ext/raphf.so $ExtensionDir/
		cp $PATH_PHPXX/ext/propro.so $ExtensionDir/
		
		echo "extension=raphf.so" > $PATH_PHPXX/etc/php.ini
		echo "extension=propro.so" >> $PATH_PHPXX/etc/php.ini
		
		remove_dir $http
		is_file $http.tgz
		if [ $? == 0 ]
		then
			banner $http".tgz Downloading"
			wget --no-check-certificate -O $SRC_PATH/$http.tgz https://pecl.php.net/get/$http.tgz >> $LOG 2>&1
		fi
		tar -zxf $http.tgz
		cd $http
		$PATH_PHPXX/apache2/bin/phpize
		./configure --with-php-config=$PATH_PHPXX/bin/php-config --with-http-libcurl-dir=$AMPPS_PATH/curl-7 CPPFLAGS="-I$AMPPS_PATH/openssl-11/include -I$AMPPS_PATH/curl-7/include"  LIBS=-Wl,-rpath=$AMPPS_PATH/curl-7/lib:$AMPPS_PATH/openssl-11/lib

		sed -i 's/-I\/usr\/local\/apps\/curl-7\/include/-I\/usr\/local\/apps\/curl-7\/include -I\/usr\/local\/apps\/openssl-11\/include/g' Makefile
		sed -i 's/-rpath,\/usr\/local\/apps\/curl-7\/lib/-rpath,\/usr\/local\/apps\/curl-7\/lib:\/usr\/local\/apps\/openssl-11\/lib/g' Makefile
		
		make && make install >> $LOG 2>&1
		
		mv $ExtensionDir/{*.a,*.so} $PATH_PHPXX/ext/
		
		rm -f $PATH_PHPXX/etc/php.ini
		
	fi
	
	is_file $PATH_PHPXX"/ext/http.so"
	if [ $? == 0 ]
	then
		banner 'http 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 -O $SRC_PATH/$php_pdf.tgz 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
}

php74_ssh2(){

	is_file $PATH_PHPXX"/ext/ssh2.so"
	if [ $? == 0 ]
	then

		# Libraries
		#mbstring
		
		banner "Installing ssh2 for php74 "
		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 php74 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
}

PATH_PHPXX=$PATH_PHP74
php74_cgi
#mod_php74
php74
#suphp74
mod_php74_2
#suphp73_2
php74_xmlrpc
php74_libmemcached
php74_memcached
php74_mailparse
php74_imagick
php74_libsodium
php74_pgsql
php74_pdo_pgsql
mongo74
mod_varnish74
memcache74
php_zstd
php_igbinary
php74_redis
php74_mcrypt
php_apcu
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 pdo_firebird
#php_ext luasandbox
php_ext lzf
#php_ext oci8 -with-oci8=shared,instantclient,$SRC_PATH/instantclient_21_8
#php_ext oci8 --with-pdo-oci=shared,instantclient,$SRC_PATH/instantclient_21_8
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
php74_ssh2