This script will not work with version 5.0.1. It will not work
Which script ? And maybe, you could give further details?
Thank you.
This script will not work with version 5.0.1. It will not work
Which script ? And maybe, you could give further details?
Thank you.
Nuxwin he is talking about my script which is installing addons like APCu or Ioncube (see first post).
Generell:
I updated the script to match the new PhpSwitcher 5 version. One big change is, that the script is no longer compiling php versions. It is now only adding additional modules! So compile them on your own and read the readme
Here is an optimized version of you script UncleSam
Here is an optimized version of you script UncleSam
Display MoreShell-Script
- #!/bin/bash
- phpVersions='7.4 7.3 7.2 7.1 7.0 5.6'
- ### Do not change anything below this line
- echo 'List of PHP versions:' $phpVersions
- function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
- echo 'Adding Extensions'
- echo "Adding APCU"
- # 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, 7.4
- for version in $phpVersions
- do
- echo "Adding APCU to PHP version " $version
- if version_lt $version 7.0; then
- /opt/phpswitcher/static/php$version/bin/pecl install channel://pecl.php.net/apcu-4.0.11
- PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/02_apcu.ini
- else
- /opt/phpswitcher/static/php$version/bin/pecl install channel://pecl.php.net/apcu-5.1.17
- PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/apcu.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/02_apcu.ini
- fi
- done
- echo "Adding Imagick"
- aptitude install libmagickwand-dev imagick
- for version in $phpVersions
- do
- echo "Adding Imagick to PHP version " $version
- /opt/phpswitcher/static/php$version/bin/pecl install imagick
- PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/imagick.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/03_imagick.ini
- done
- echo "Adding ioncube"
- cd /usr/local/src
- # cleanup first
- rm /usr/local/src/ioncube_loaders_lin_x86-64.tar.gz
- rm -r /usr/local/src/ioncube/
- wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
- tar -xzf ioncube_loaders_lin_x86-64.tar.gz
- rm ioncube_loaders_lin_x86-64.tar.gz
- cd ioncube
- for version in $phpVersions
- do
- echo "Adding Ioncube to PHP version" $version
- PHP_EXT_DIR=$(/opt/phpswitcher/static/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/static/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
- service nginx restart
- echo "Done"
Already replaced my script - big thx Starlight !
(I hope this is ok for you!)
yes I see it, I am very very happy about that
5.1.18 | stable | 2019-10-28 | apcu-5.1.18.tgz (92.4kB) DLL | [ Changelog ] |
---|