PhpSwitcher: add APCU, Imagick and IONCUBE
-
- community contribution
- UncleSam
-
-
Shell-Script
- #!/bin/bash
- phpVersions='7.4 7.3 7.2 7.1 7.0 5.6'
- installDir=$(date +'%Y%m%d_%H%M%S')
- ### 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 'Compiling PHP versions'
- #perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --install-dir $installDir --register $phpVersions
- perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --register $phpVersions
- 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
- printf '\n' | /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
- printf '\n' | /opt/phpswitcher/static/php$version/bin/pecl install channel://pecl.php.net/apcu-5.1.18
- 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
- printf '\n' | /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 Mcrypt"
- aptitude install libmcrypt-dev libc-dev autoconf pkg-config
- for version in $phpVersions
- do
- if version_lt $version 7.2; then
- echo "Ignoring version $version for Mcrypt (to low)"
- else
- echo "Adding Mcrypt to PHP version " $version
- printf '\n' | /opt/phpswitcher/static/php$version/bin/pecl install mcrypt
- PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/mcrypt.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/03_mcrypt.ini
- fi
- done
- #echo "Adding additional extensions"
- #for version in $phpVersions
- #do
- # PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- # echo "extension = $PHP_EXT_DIR/mysqli.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/04_mysqli.ini
- # echo "extension = $PHP_EXT_DIR/opcache.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/04_opcache.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/
- # loading 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
- # loading BETA ioncube (has no ioncube subfolder)
- wget https://www.ioncube.com/php-7.4.0-beta-loaders/ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- tar -xzf ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- rm ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- for version in $phpVersions
- do
- if version_lt $version 7.4; then
- 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
- else
- echo "Adding BETA Ioncube to PHP version" $version
- PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- cp ioncube_loader_lin_7.4.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
- fi
- done
- cd
- echo "Restarting services..."
- for version in $phpVersions
- do
- service psw$version-fpm restart
- done
- service apache2 restart
- service nginx restart
- echo "Done"
Adding BETA Ioncube to PHP version umgewandelt in normal.
-
-
Thx Speddy for the info! I switched 7.4 to normal mode but left the code if there is going to be another beta version. I also tried to compile 7.4.8 but it seems that this is not working. Mayber someone has a solution for that (part of the error message: --override-config is not set; not updating apt.conf Read the manpage for details.).
Here is the new code:
Shell-Script- #!/bin/bash
- #phpVersions='7.4 7.3 7.2 7.1 7.0 5.6'
- phpVersions='5.6 7.1 7.2 7.3 7.4'
- installDir=$(date +'%Y%m%d_%H%M%S')
- ### 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 'Compiling PHP versions'
- #perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --install-dir $installDir --register $phpVersions
- perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --register $phpVersions
- 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
- printf '\n' | /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
- printf '\n' | /opt/phpswitcher/static/php$version/bin/pecl install apcu
- 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
- printf '\n' | /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 Mcrypt"
- aptitude install libmcrypt-dev libc-dev autoconf pkg-config
- for version in $phpVersions
- do
- if version_lt $version 7.2; then
- echo "Ignoring version $version for Mcrypt (to low)"
- else
- echo "Adding Mcrypt to PHP version " $version
- printf '\n' | /opt/phpswitcher/static/php$version/bin/pecl install mcrypt
- PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/mcrypt.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/03_mcrypt.ini
- fi
- done
- #echo "Adding additional extensions"
- #for version in $phpVersions
- #do
- # PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- # echo "extension = $PHP_EXT_DIR/mysqli.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/04_mysqli.ini
- # echo "extension = $PHP_EXT_DIR/opcache.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/04_opcache.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/
- # loading 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
- # --- 7.4 is no longer in a special beta archive ---
- # --- (codes stays in cases of another beta iconcube loader ---
- # loading BETA ioncube (has no ioncube subfolder)
- #wget https://www.ioncube.com/php-7.4.0-beta-loaders/ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- #tar -xzf ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- #rm ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- 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
- # --- Code if there is a beta version
- # if version_lt $version 7.4; then
- # 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
- # else
- # echo "Adding BETA Ioncube to PHP version" $version
- # PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- # cp ioncube_loader_lin_7.4_10.4.0_beta2.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
- # fi
- done
- cd
- echo "Restarting services..."
- for version in $phpVersions
- do
- service psw$version-fpm restart
- done
- service apache2 restart
- service nginx restart
- echo "Done"
PHP 7.4.8 Error message - mayber someone can fix it:
Code- Applying patch 0029-php-5.4.9-fixheader.patch
- patching file configure.ac
- Hunk #1 FAILED at 1303.
- 1 out of 1 hunk FAILED -- rejects in file configure.ac
- Patch 0029-php-5.4.9-fixheader.patch does not apply (enforce with -f)
- /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/Makefile:230: recipe for target 'patch-stamp' failed
- make: Leaving directory '/usr/local/src/phpswitcher/php-7.4.8'
- I: Copying back the cached apt archive contents
- I: unmounting /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler filesystem
- I: unmounting /usr/local/src/phpswitcher/php-7.4.8 filesystem
- I: unmounting /opt/phpswitcher/20200717 filesystem
- I: unmounting dev/ptmx filesystem
- I: unmounting dev/pts filesystem
- I: unmounting dev/shm filesystem
- I: unmounting proc filesystem
- I: unmounting sys filesystem
- I: Cleaning COW directory
- I: forking: rm -rf /var/cache/pbuilder/build/cow.23739
- [ERROR] main: An error occurred while executing MAKE(1) target(s) for PHP 7.4.8: W: --override-config is not set; not updating apt.conf Read the manpage for details.
- gpg: key 4F4EA0AAE5267A6C: public key "Launchpad PPA for Ond\xc5\x99ej Sur?" imported
-
Thx Speddy for the info! I switched 7.4 to normal mode but left the code if there is going to be another beta version. I also tried to compile 7.4.8 but it seems that this is not working. Mayber someone has a solution for that (part of the error message: --override-config is not set; not updating apt.conf Read the manpage for details.).
Here is the new code:
Shell-Script- #!/bin/bash
- #phpVersions='7.4 7.3 7.2 7.1 7.0 5.6'
- phpVersions='5.6 7.1 7.2 7.3 7.4'
- installDir=$(date +'%Y%m%d_%H%M%S')
- ### 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 'Compiling PHP versions'
- #perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --install-dir $installDir --register $phpVersions
- perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --register $phpVersions
- 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
- printf '\n' | /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
- printf '\n' | /opt/phpswitcher/static/php$version/bin/pecl install apcu
- 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
- printf '\n' | /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 Mcrypt"
- aptitude install libmcrypt-dev libc-dev autoconf pkg-config
- for version in $phpVersions
- do
- if version_lt $version 7.2; then
- echo "Ignoring version $version for Mcrypt (to low)"
- else
- echo "Adding Mcrypt to PHP version " $version
- printf '\n' | /opt/phpswitcher/static/php$version/bin/pecl install mcrypt
- PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- echo "extension = $PHP_EXT_DIR/mcrypt.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/03_mcrypt.ini
- fi
- done
- #echo "Adding additional extensions"
- #for version in $phpVersions
- #do
- # PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- # echo "extension = $PHP_EXT_DIR/mysqli.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/04_mysqli.ini
- # echo "extension = $PHP_EXT_DIR/opcache.so" > /opt/phpswitcher/static/php$version/etc/php/conf.d/04_opcache.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/
- # loading 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
- # --- 7.4 is no longer in a special beta archive ---
- # --- (codes stays in cases of another beta iconcube loader ---
- # loading BETA ioncube (has no ioncube subfolder)
- #wget https://www.ioncube.com/php-7.4.0-beta-loaders/ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- #tar -xzf ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- #rm ioncube_loaders_lin_x86-64_7.4_BETA2.tar.gz
- 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
- # --- Code if there is a beta version
- # if version_lt $version 7.4; then
- # 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
- # else
- # echo "Adding BETA Ioncube to PHP version" $version
- # PHP_EXT_DIR=$(/opt/phpswitcher/static/php$version/bin/php-config --extension-dir)
- # cp ioncube_loader_lin_7.4_10.4.0_beta2.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
- # fi
- done
- cd
- echo "Restarting services..."
- for version in $phpVersions
- do
- service psw$version-fpm restart
- done
- service apache2 restart
- service nginx restart
- echo "Done"
PHP 7.4.8 Error message - mayber someone can fix it:
Code- Applying patch 0029-php-5.4.9-fixheader.patch
- patching file configure.ac
- Hunk #1 FAILED at 1303.
- 1 out of 1 hunk FAILED -- rejects in file configure.ac
- Patch 0029-php-5.4.9-fixheader.patch does not apply (enforce with -f)
- /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/Makefile:230: recipe for target 'patch-stamp' failed
- make: Leaving directory '/usr/local/src/phpswitcher/php-7.4.8'
- I: Copying back the cached apt archive contents
- I: unmounting /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler filesystem
- I: unmounting /usr/local/src/phpswitcher/php-7.4.8 filesystem
- I: unmounting /opt/phpswitcher/20200717 filesystem
- I: unmounting dev/ptmx filesystem
- I: unmounting dev/pts filesystem
- I: unmounting dev/shm filesystem
- I: unmounting proc filesystem
- I: unmounting sys filesystem
- I: Cleaning COW directory
- I: forking: rm -rf /var/cache/pbuilder/build/cow.23739
- [ERROR] main: An error occurred while executing MAKE(1) target(s) for PHP 7.4.8: W: --override-config is not set; not updating apt.conf Read the manpage for details.
- gpg: key 4F4EA0AAE5267A6C: public key "Launchpad PPA for Ond\xc5\x99ej Sur?" i
So for me another error message appears.
Code- Applying patch 0029-php-5.4.9-fixheader.patch
- patching file configure.ac
- Hunk #1 FAILED at 1303.
- 1 out of 1 hunk FAILED -- rejects in file configure.ac
- Patch 0029-php-5.4.9-fixheader.patch does not apply (enforce with -f)
- /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/Makefile:230: recipe for target 'patch-stamp' failed
- make: Leaving directory '/usr/local/src/phpswitcher/php-7.4.8'
- I: Copying back the cached apt archive contents
- I: unmounting /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler filesystem
- I: unmounting /usr/local/src/phpswitcher/php-7.4.8 filesystem
- I: unmounting /opt/phpswitcher/20200718 filesystem
- I: unmounting dev/ptmx filesystem
- I: unmounting dev/pts filesystem
- I: unmounting dev/shm filesystem
- I: unmounting proc filesystem
- I: unmounting sys filesystem
- I: Cleaning COW directory
- I: forking: rm -rf /var/cache/pbuilder/build/cow.9353
- [ERROR] main: An error occurred while executing MAKE(1) target(s) for PHP 7.4.8: dh_install: Compatibility levels before 9 are deprecated (level 7 in use)
- dh_installdocs: Compatibility levels before 9 are deprecated (level 7 in use)
- dh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use)
- Starting pkgProblemResolver with broken count: 0
- Starting 2 pkgProblemResolver with broken count: 0
- Done
- Starting pkgProblemResolver with broken count: 0
- Starting 2 pkgProblemResolver with broken count: 0
- Done
- Extracting templates from packages: 100%
- make: [unprepared] Error 1 (ignored)
- No patch removed
- make: *** [patch-stamp] Error 1
-
-
09 Jul 2020
PHP 7.4.8 Released!
The PHP development team announces the immediate availability of PHP 7.4.8. This is a security release impacting the official Windows builds of PHP.
For windows users running an official build, this release contains a patched version of libcurl addressing CVE-2020-8169.
For all other consumers of PHP, this is a bug fix release.
All PHP 7.4 users are encouraged to upgrade to this version.
For source downloads of PHP 7.4.8 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
09 Jul 2020
PHP 7.2.32 Released!
The PHP development team announces the immediate availability of PHP 7.2.32. This is a security release impacting the official Windows builds of PHP.
For windows users running an official build, this release contains a patched version of libcurl addressing CVE-2020-8169.
For all other consumers of PHP, this release is functionally identical to PHP 7.2.31 and no upgrade from that point release is necessary.
For source downloads of PHP 7.2.32 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
09 Jul 2020
PHP 7.3.20 Released!
The PHP development team announces the immediate availability of PHP 7.3.20. This is a security release impacting the official Windows builds of PHP.
For windows users running an official build, this release contains a patched version of libcurl addressing CVE-2020-8169.
For all other consumers of PHP, this is a bug fix release.
All PHP 7.3 users are encouraged to upgrade to this version.
For source downloads of PHP 7.3.20 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
-
I get the same error as Speddy
which can be ignored with an environment variable that force the use of Level 9 for DebHelper:
To set this variable :
export DH_COMPAT=9
and to remove it, simply :
unset DH_COMPAT
Unfortunetely, there is some more errors on the way and the build keep failing, no solution so far.
As PHP7.4.8 is mostly a security fix for Windows users, I'll not bother with it and will wait next release (maybe they did something wrong with this build for Linux users ^^)
-
-
Little addition :
The error so, which is the patch is not applying... well, normal (see below)
Code- Applying patch 0029-php-5.4.9-fixheader.patch
- patching file configure.ac
- Hunk #1 FAILED at 1303.
- 1 out of 1 hunk FAILED -- rejects in file configure.ac
- Patch 0029-php-5.4.9-fixheader.patch does not apply (enforce with -f)
- /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/Makefile:230: recipe for target 'patch-stamp' failed
- make: Leaving directory '/usr/local/src/phpswitcher/php-7.4.8'
- I: Copying back the cached apt archive contents
- I: unmounting /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler filesystem
- I: unmounting /usr/local/src/phpswitcher/php-7.4.8 filesystem
- I: unmounting /opt/phpswitcher/20200719 filesystem
- I: unmounting dev/ptmx filesystem
- I: unmounting dev/pts filesystem
- I: unmounting dev/shm filesystem
- I: unmounting proc filesystem
- I: unmounting sys filesystem
- I: Cleaning COW directory
- I: forking: rm -rf /var/cache/pbuilder/build/cow.11164
- [ERROR] main: An error occurred while executing MAKE(1) target(s) for PHP 7.4.8: Starting pkgProblemResolver with broken count: 0
- Starting 2 pkgProblemResolver with broken count: 0
- Done
- Starting pkgProblemResolver with broken count: 0
- Starting 2 pkgProblemResolver with broken count: 0
- Done
- Extracting templates from packages: 100%
- make: [unprepared] Error 1 (ignored)
- No patch removed
- make: *** [patch-stamp] Error 1
For this attempt, I set the DebHelper level to 9 (max is 12, but I didn't tested with)...
Then, as this is working with PHP7.4.7 and no 7.4.8, I checked the changes in the "configure.ac" file, and... see by yourself:
PHP 7.4.7:
PHP 7.4.8:
The patch file now :
Well... they changed just this little line... why ? I don't know.
So for me, two/tree solutions :
1- We revert the change in the configure.ac file
2- We remove or "correct" the patch from the list
3- We manually edit the configure.ac file to reflect the "patch"
Edit :
Little info : We can simply "remove" the patch from the applicable list of patches too (comment in file : /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/patches/7.4/series)
Whichever solution you apply, the build should be fine after that.
Quick edit, two of the solutions you can use to build PHP 7.4.8 :
Solution 1 - Edit the patch file
By using your prefered editor, open the files : /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/patches/7.4/0029-php-5.4.9-fixheader.patch*
(Yes, there is "two" files, one with a "~" at the end, don't know why, but it's there)
This file should look like this :
Diff- From: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
- Date: Sat, 2 May 2015 10:26:56 +0200
- Subject: php-5.4.9-fixheader
- Make generated php_config.h constant across rebuilds.
- ---
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- --- a/configure.ac
- +++ b/configure.ac
- @@ -1303,7 +1303,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
- -UNAME=`uname -a | xargs`
- +UNAME=`uname | xargs`
- PHP_UNAME=${PHP_UNAME:-$UNAME}
- AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
- PHP_OS=`uname | xargs`
- AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
Save, then re-run the build process from PHP Switcher.
/!\ I'm not an expert, and maybe this patch is not needed anymore.
In fact, I don't know what will be the output of the "php_uname()" with this command passed in the config : PHP_UNAME=${PHP_UNAME:-$UNAME}
This patch, if I'm not wrong, is to obfuscate the output of some PHP variables, here, to prevent the leak of the system information through this function "php_uname()" (so that it display only "Linux" and not the whole "uname -a" result).
After I did compile with this modification, the "PHP_OS()" is empty, and "PHP_UNAME()" give the "full" details, so I don't know at the end...
We may revert this configure.ac file as the version 7.4.7 to check if the result is different or not on the webserver after compilation, but no more time for today (idea would be to remove "UNAME" and "PHP_UNAME" lines, and then, add back the "old modified" "PHP_UNAME" line.
Solution 2 - Disable this patch to apply
Simply open this file : /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/patches/7.4/series
Then, found the line where the patch is noted : "0029-php-5.4.9-fixheader.patch"
Add a "#" at the start of the line, so that this patch will NOT be applied.
Save the file then re-run the build process from PHP Switcher.
For both solutions, if you get the error posted in the previous message, just set the system variable :
To set this variable :
export DH_COMPAT=9
and to remove it, simply :
unset DH_COMPAT
-
-
-
23 Jul 2020
PHP 8.0.0 Alpha 3 available for testing
The PHP team is pleased to announce the second testing release of PHP 8.0.0, Alpha 3. This continues the PHP 8.0 release cycle, the rough outline of which is specified in the PHP Wiki.
For source downloads of PHP 8.0.0 Alpha 3 please visit the download page.
Please carefully test this version and report any issues found in the bug reporting system.
Please DO NOT use this version in production, it is an early test version.
For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive.
The next release will be Beta 1, planned for Aug 06 2020.
The signatures for the release can be found in the manifest or on the QA site.
Thank you for helping us make PHP better.
-
First of all thank you very much Athar ! I was able to compile it but only with step 2 (by commenting out the patch 0029). I did not need to set the environment variable. It also seems that it is compatible with this script. I updated the first post.
Little addition :
The error so, which is the patch is not applying... well, normal (see below)
Code- Applying patch 0029-php-5.4.9-fixheader.patch
- patching file configure.ac
- Hunk #1 FAILED at 1303.
- 1 out of 1 hunk FAILED -- rejects in file configure.ac
- Patch 0029-php-5.4.9-fixheader.patch does not apply (enforce with -f)
- /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/Makefile:230: recipe for target 'patch-stamp' failed
- make: Leaving directory '/usr/local/src/phpswitcher/php-7.4.8'
- I: Copying back the cached apt archive contents
- I: unmounting /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler filesystem
- I: unmounting /usr/local/src/phpswitcher/php-7.4.8 filesystem
- I: unmounting /opt/phpswitcher/20200719 filesystem
- I: unmounting dev/ptmx filesystem
- I: unmounting dev/pts filesystem
- I: unmounting dev/shm filesystem
- I: unmounting proc filesystem
- I: unmounting sys filesystem
- I: Cleaning COW directory
- I: forking: rm -rf /var/cache/pbuilder/build/cow.11164
- [ERROR] main: An error occurred while executing MAKE(1) target(s) for PHP 7.4.8: Starting pkgProblemResolver with broken count: 0
- Starting 2 pkgProblemResolver with broken count: 0
- Done
- Starting pkgProblemResolver with broken count: 0
- Starting 2 pkgProblemResolver with broken count: 0
- Done
- Extracting templates from packages: 100%
- make: [unprepared] Error 1 (ignored)
- No patch removed
- make: *** [patch-stamp] Error 1
For this attempt, I set the DebHelper level to 9 (max is 12, but I didn't tested with)...
Then, as this is working with PHP7.4.7 and no 7.4.8, I checked the changes in the "configure.ac" file, and... see by yourself:
PHP 7.4.7:
PHP 7.4.8:
The patch file now :
Well... they changed just this little line... why ? I don't know.
So for me, two/tree solutions :
1- We revert the change in the configure.ac file
2- We remove or "correct" the patch from the list
3- We manually edit the configure.ac file to reflect the "patch"
Edit :
Little info : We can simply "remove" the patch from the applicable list of patches too (comment in file : /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/patches/7.4/series)
Whichever solution you apply, the build should be fine after that.
Quick edit, two of the solutions you can use to build PHP 7.4.8 :
Solution 1 - Edit the patch file
By using your prefered editor, open the files : /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/patches/7.4/0029-php-5.4.9-fixheader.patch*
(Yes, there is "two" files, one with a "~" at the end, don't know why, but it's there)
This file should look like this :
Diff- From: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
- Date: Sat, 2 May 2015 10:26:56 +0200
- Subject: php-5.4.9-fixheader
- Make generated php_config.h constant across rebuilds.
- ---
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- --- a/configure.ac
- +++ b/configure.ac
- @@ -1303,7 +1303,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
- -UNAME=`uname -a | xargs`
- +UNAME=`uname | xargs`
- PHP_UNAME=${PHP_UNAME:-$UNAME}
- AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
- PHP_OS=`uname | xargs`
- AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
Save, then re-run the build process from PHP Switcher.
/!\ I'm not an expert, and maybe this patch is not needed anymore.
In fact, I don't know what will be the output of the "php_uname()" with this command passed in the config : PHP_UNAME=${PHP_UNAME:-$UNAME}
This patch, if I'm not wrong, is to obfuscate the output of some PHP variables, here, to prevent the leak of the system information through this function "php_uname()" (so that it display only "Linux" and not the whole "uname -a" result).
After I did compile with this modification, the "PHP_OS()" is empty, and "PHP_UNAME()" give the "full" details, so I don't know at the end...
We may revert this configure.ac file as the version 7.4.7 to check if the result is different or not on the webserver after compilation, but no more time for today (idea would be to remove "UNAME" and "PHP_UNAME" lines, and then, add back the "old modified" "PHP_UNAME" line.
Solution 2 - Disable this patch to apply
Simply open this file : /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/patches/7.4/series
Then, found the line where the patch is noted : "0029-php-5.4.9-fixheader.patch"
Add a "#" at the start of the line, so that this patch will NOT be applied.
Save the file then re-run the build process from PHP Switcher.
For both solutions, if you get the error posted in the previous message, just set the system variable :
To set this variable :
export DH_COMPAT=9
and to remove it, simply :
unset DH_COMPAT
-