PhpSwitcher: add APCU, Imagick and IONCUBE
-
- community contribution
- UncleSam
-
-
-
-
OS/Platform Packages Version Release Date Linux (32 bits) tar.gz zip 10.2.7 2018-11-08 UPDATED Linux (64 bits) tar.gz zip 10.2.7 2018-11-08 UPDATED Beta Loaders for PHP 7.3
The following are beta ionCube Loaders that can be used with the release candidate (RC) versions of PHP 7.3.0 on Linux and FreeBSD 11. They can run files encoded with the version 10 PHP 7.1 and 7.2 Encoders. As with PHP 7.3.0 RC versions themselves, these loaders should not be used in a production environment.
OS/Platform Package Version Release Date
Linux (32 bits) tar.gz 10.3.0-beta 2018-11-13 UPDATED
Linux (64 bits) tar.gz 10.3.0-beta 2018-11-13 UPDATED
FreeBSD 11 (32 bits) tar.gz 10.3.0-beta 2018-11-13 UPDATED
FreeBSD 11 (64 bits) tar.gz 10.3.0-beta 2018-11-13 UPDATED
-
added Ioncube 7.3
Shell-Script- #!/bin/bash
- compDate=$(date +'%Y%m%d_%H%M%S')
- echo 'Successfully set compile date to '$compDate
- echo 'Starting to compile PHP modules'
- perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --auto-setup -i /opt/phpswitcher/$compDate 7.1 7.0 5.6 5.5 5.4 5.3
- ..#perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --auto-setup -i /opt/phpswitcher/$compDate 7.3 7.2 7.1 7.0 5.6 5.5 5.4 5.3
- echo 'Adding Extensions'
- # See https://pecl.php.net/package/APCu for versions
- # version 4 for pre 7.0
- # version 5 for 7.0, 7.1, 7.2 7.3(not yet supported)
- echo "Adding APCU"
- /opt/phpswitcher/$compDate/php5.3/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.3/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.3/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.4/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.4/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.4/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.5/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.5/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.5/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.6/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.6/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.6/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php7.0/bin/pecl install channel://pecl.php.net/apcu-5.1.9
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.0/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.0/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php7.1/bin/pecl install channel://pecl.php.net/apcu-5.1.9
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.1/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.1/etc/php/conf.d/02_apcu.ini
- #/opt/phpswitcher/$compDate/php7.2/bin/pecl install channel://pecl.php.net/apcu-5.1.9
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.2/bin/php-config --extension-dir)
- #echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/02_apcu.ini
- #/opt/phpswitcher/$compDate/php7.3/bin/pecl install channel://pecl.php.net/apcu-5.1.9
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.3/bin/php-config --extension-dir)
- #echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/02_apcu.ini
- echo "Adding ioncube"
- cd /usr/local/src
- # cleanup first (if not old version is used which is bad)
- rm /usr/local/src/ioncube_loaders_lin_x86-64.tar.gz
- rm -r /usr/local/src/ioncube/
- # wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- tar -xzf ioncube_loaders_lin_x86-64.tar.gz
- cd ioncube
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.3/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.3.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.3/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.4/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.4.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.4/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.5/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.5.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.5/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.6/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.6.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.6/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.0/bin/php-config --extension-dir)
- cp ioncube_loader_lin_7.0.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.0/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.1/bin/php-config --extension-dir)
- cp ioncube_loader_lin_7.1.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.1/etc/php/conf.d/01_ioncube.ini
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.2/bin/php-config --extension-dir)
- #cp ioncube_loader_lin_7.2.so $PHP_EXT_DIR/ioncube.so
- #echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/01_ioncube.ini
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.3/bin/php-config --extension-dir)
- #cp ioncube_loader_lin_7.3.so $PHP_EXT_DIR/ioncube.so
- #echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/01_ioncube.ini
- cd
- echo "Restarting services..."
- service psw5.3-fpm restart
- service psw5.4-fpm restart
- service psw5.5-fpm restart
- service psw5.6-fpm restart
- service psw7.0-fpm restart
- service psw7.1-fpm restart
- #service psw7.2-fpm restart
- #service psw7.3-fpm restart
- service apache2 restart
- echo "Done"
-
-
I improved the script to not add redundant code (50% less lines of code) for each new version:
Shell-Script- #!/bin/bash
- compDate=$(date +'%Y%m%d_%H%M%S')
- echo 'Successfully set compile date to' $compDate
- # Add your Versions here
- phpVersions='7.1 7.0 5.6 5.4 5.5 5.4 5.3'
- echo 'List of PHP versions to compile:' $phpVersions
- ### Do not change anything below this line
- function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
- echo 'Starting to compile PHP modules'
- perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --auto-setup -i /opt/phpswitcher/$compDate $phpVersions
- trap EXIT
- echo 'Adding Extensions'
- # See https://pecl.php.net/package/APCu for versions
- # version 4 for pre 7.0
- # version 5 for 7.0, 7.1, 7.2 7.3(not yet supported)
- echo "Adding APCU"
- for version in $phpVersions
- do
- echo "Adding APCU for PHP version" $version
- if version_lt $version 7.0; then
- /opt/phpswitcher/$compDate/php$version/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php$version/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php$version/etc/php/conf.d/02_apcu.ini
- else
- /opt/phpswitcher/$compDate/php$version/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php$version/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php$version/etc/php/conf.d/02_apcu.ini
- fi
- done
- echo "Adding ioncube"
- cd /usr/local/src
- # cleanup first (if not old version is used which is bad)
- rm /usr/local/src/ioncube_loaders_lin_x86-64.tar.gz
- rm -r /usr/local/src/ioncube/
- # wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- tar -xzf ioncube_loaders_lin_x86-64.tar.gz
- cd ioncube
- for version in $phpVersions
- do
- echo "Adding Ioncube for PHP version" $version
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php$version/bin/php-config --extension-dir)
- cp ioncube_loader_lin_$version.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php$version/etc/php/conf.d/01_ioncube.ini
- done
- cd
- echo "Restarting services..."
- for version in $phpVersions
- do
- service psw$version-fpm restart
- done
- service apache2 restart
- echo "Done"
-
APCU new Version
5.1.14 - Fixed GH #347: Disable slam defense by default.
- Fix potential issue with destruction of locks. This does not affect Linux, but might affect Windows and BSD.
- Use mutex instead of rwlock for shared memory allocator (if pthreads mutex available).
- Require only read-lock for apcu_cas(), by using atomic compare-and-swap. -
-
Changelog for APCu
5.1.15 - Restore apc.serializer=php as the default, as the "default" serializer still/again has issues.
- Fix possible issues in persistence of arrays with the "default" serializer.
- Attempt to reduce shared memory fragementation.5.1.15 stable 2018-12-07 apcu-5.1.15.tgz (91.8kB) DLL [Changelog] -
Added APCu version 5.1.15
Shell-Script- #!/bin/bash
- compDate=$(date +'%Y%m%d_%H%M%S')
- echo 'Successfully set compile date to '$compDate
- echo 'Starting to compile PHP modules'
- perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --auto-setup -i /opt/phpswitcher/$compDate 7.1 7.0 5.6 5.5 5.4 5.3
- #perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --auto-setup -i /opt/phpswitcher/$compDate 7.3 7.2 7.1 7.0 5.6 5.5 5.4 5.3
- echo 'Adding Extensions'
- # See https://pecl.php.net/package/APCu for versions
- # version 4 for pre 7.0
- # version 5 for 7.0, 7.1, 7.2 7.3(not yet supported)
- echo "Adding APCU"
- /opt/phpswitcher/$compDate/php5.3/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.3/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.3/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.4/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.4/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.4/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.5/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.5/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.5/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.6/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.6/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.6/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php7.0/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.0/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.0/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php7.1/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.1/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.1/etc/php/conf.d/02_apcu.ini
- #/opt/phpswitcher/$compDate/php7.2/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.2/bin/php-config --extension-dir)
- #echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/02_apcu.ini
- #/opt/phpswitcher/$compDate/php7.3/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.3/bin/php-config --extension-dir)
- #echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/02_apcu.ini
- echo "Adding ioncube"
- cd /usr/local/src
- # cleanup first (if not old version is used which is bad)
- rm /usr/local/src/ioncube_loaders_lin_x86-64.tar.gz
- rm -r /usr/local/src/ioncube/
- # wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- tar -xzf ioncube_loaders_lin_x86-64.tar.gz
- cd ioncube
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.3/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.3.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.3/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.4/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.4.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.4/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.5/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.5.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.5/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.6/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.6.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.6/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.0/bin/php-config --extension-dir)
- cp ioncube_loader_lin_7.0.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.0/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.1/bin/php-config --extension-dir)
- cp ioncube_loader_lin_7.1.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.1/etc/php/conf.d/01_ioncube.ini
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.2/bin/php-config --extension-dir)
- #cp ioncube_loader_lin_7.2.so $PHP_EXT_DIR/ioncube.so
- #echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/01_ioncube.ini
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.3/bin/php-config --extension-dir)
- #cp ioncube_loader_lin_7.3.so $PHP_EXT_DIR/ioncube.so
- #echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/01_ioncube.ini
- cd
- echo "Restarting services..."
- service psw5.3-fpm restart
- service psw5.4-fpm restart
- service psw5.5-fpm restart
- service psw5.6-fpm restart
- service psw7.0-fpm restart
- service psw7.1-fpm restart
- #service psw7.2-fpm restart
- #service psw7.3-fpm restart
- service apache2 restart
- echo "Done"
-
-
Added APCu version 5.1.15
Shell-Script- #!/bin/bash
- compDate=$(date +'%Y%m%d_%H%M%S')
- echo 'Successfully set compile date to '$compDate
- echo 'Starting to compile PHP modules'
- perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --auto-setup -i /opt/phpswitcher/$compDate 7.1 7.0 5.6 5.5 5.4 5.3
- #perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --auto-setup -i /opt/phpswitcher/$compDate 7.3 7.2 7.1 7.0 5.6 5.5 5.4 5.3
- echo 'Adding Extensions'
- # See https://pecl.php.net/package/APCu for versions
- # version 4 for pre 7.0
- # version 5 for 7.0, 7.1, 7.2 7.3(not yet supported)
- echo "Adding APCU"
- /opt/phpswitcher/$compDate/php5.3/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.3/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.3/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.4/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.4/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.4/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.5/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.5/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.5/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php5.6/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.6/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php5.6/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php7.0/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.0/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.0/etc/php/conf.d/02_apcu.ini
- /opt/phpswitcher/$compDate/php7.1/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.1/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.1/etc/php/conf.d/02_apcu.ini
- #/opt/phpswitcher/$compDate/php7.2/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.2/bin/php-config --extension-dir)
- #echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/02_apcu.ini
- #/opt/phpswitcher/$compDate/php7.3/bin/pecl install channel://pecl.php.net/apcu-5.1.15
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.3/bin/php-config --extension-dir)
- #echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/02_apcu.ini
- echo "Adding ioncube"
- cd /usr/local/src
- # cleanup first (if not old version is used which is bad)
- rm /usr/local/src/ioncube_loaders_lin_x86-64.tar.gz
- rm -r /usr/local/src/ioncube/
- # wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- tar -xzf ioncube_loaders_lin_x86-64.tar.gz
- cd ioncube
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.3/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.3.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.3/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.4/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.4.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.4/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.5/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.5.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.5/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php5.6/bin/php-config --extension-dir)
- cp ioncube_loader_lin_5.6.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php5.6/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.0/bin/php-config --extension-dir)
- cp ioncube_loader_lin_7.0.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.0/etc/php/conf.d/01_ioncube.ini
- PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.1/bin/php-config --extension-dir)
- cp ioncube_loader_lin_7.1.so $PHP_EXT_DIR/ioncube.so
- echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.1/etc/php/conf.d/01_ioncube.ini
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.2/bin/php-config --extension-dir)
- #cp ioncube_loader_lin_7.2.so $PHP_EXT_DIR/ioncube.so
- #echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.2/etc/php/conf.d/01_ioncube.ini
- #PHP_EXT_DIR=$(/opt/phpswitcher/$compDate/php7.3/bin/php-config --extension-dir)
- #cp ioncube_loader_lin_7.3.so $PHP_EXT_DIR/ioncube.so
- #echo "zend_extension = $PHP_EXT_DIR/ioncube.so" > /opt/phpswitcher/$compDate/php7.3/etc/php/conf.d/01_ioncube.ini
- cd
- echo "Restarting services..."
- service psw5.3-fpm restart
- service psw5.4-fpm restart
- service psw5.5-fpm restart
- service psw5.6-fpm restart
- service psw7.0-fpm restart
- service psw7.1-fpm restart
- #service psw7.2-fpm restart
- #service psw7.3-fpm restart
- service apache2 restart
- echo "Done"
Thx Speedy , I updated the main post.
-
-