0

I need to upgrade to PHP 7.4.3 (from 7.4.14), and I have somehow managed to make no progress after many, many hours. *Needed for MediaWiki, Roundcube and PostfixAdmin.

Two questions:

  1. Do I have to compile from source to get 7.4.3, or is there an easier way?
  2. If yes to the above, how do I fix the bugs below?

Errors

openssl and imap are clearly giving me trouble (opcache was much worse until I just disabled it)

=====================================================================
TIME END 2021-01-19 04:58:21

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :   18
Exts tested     :   55
---------------------------------------------------------------------

Number of tests : 15674             12815
Tests skipped   : 2859 ( 18.2%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :   17 (  0.1%) (  0.1%)
Expected fail   :   35 (  0.2%) (  0.3%)
Tests passed    : 12763 ( 81.4%) ( 99.6%)
---------------------------------------------------------------------
Time taken      : 1099 seconds
=====================================================================

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Test open_basedir configuration [tests/security/open_basedir_linkinfo.phpt]  XFAIL REASON: BUG: open_basedir cannot delete symlink to prohibited file. See also
bugs 48111 and 52176.
Inconsistencies when accessing protected members [Zend/tests/access_modifiers_008.phpt]  XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Inconsistencies when accessing protected members - 2 [Zend/tests/access_modifiers_009.phpt]  XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770.phpt]  XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_2.phpt]  XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_3.phpt]  XFAIL REASON: See Bug #48770
Initial value of static var in method depends on the include time of the class definition [Zend/tests/method_static_var.phpt]  XFAIL REASON: Maybe not a bug
DateTime::add() -- fall type2 type3 [ext/date/tests/DateTime_add-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type2 [ext/date/tests/DateTime_add-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type3 [ext/date/tests/DateTime_add-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type2 type3 [ext/date/tests/DateTime_add-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type2 [ext/date/tests/DateTime_add-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type3 [ext/date/tests/DateTime_add-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type2 type3 [ext/date/tests/DateTime_diff-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type2 [ext/date/tests/DateTime_diff-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type3 [ext/date/tests/DateTime_diff-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type2 type3 [ext/date/tests/DateTime_diff-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type2 [ext/date/tests/DateTime_diff-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type3 [ext/date/tests/DateTime_diff-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type2 type3 [ext/date/tests/DateTime_sub-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type2 [ext/date/tests/DateTime_sub-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type3 [ext/date/tests/DateTime_sub-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type2 type3 [ext/date/tests/DateTime_sub-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type2 [ext/date/tests/DateTime_sub-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type3 [ext/date/tests/DateTime_sub-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
Bug #52480 (Incorrect difference using DateInterval) [ext/date/tests/bug52480.phpt]  XFAIL REASON: See https://bugs.php.net/bug.php?id=52480
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, bd2) [ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-bd2.phpt]  XFAIL REASON: Still not quite right
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, fs) [ext/date/tests/rfc-datetime_and_daylight_saving_time-type3-fs.phpt]  XFAIL REASON: Still not quite right
Bug #42718 (unsafe_raw filter not applied when configured as default filter) [ext/filter/tests/bug42718.phpt]  XFAIL REASON: FILTER_UNSAFE_RAW not applied when configured as default filter, even with flags
Bug #67296 (filter_input doesn't validate variables) [ext/filter/tests/bug49184.phpt]  XFAIL REASON: See Bug #49184
Bug #67167: filter_var(null,FILTER_VALIDATE_BOOLEAN,FILTER_NULL_ON_FAILURE) returns null [ext/filter/tests/bug67167.02.phpt]  XFAIL REASON: Requires php_zval_filter to not use convert_to_string for all filters.
via [ext/pdo_sqlite/tests/common.phpt]
        SQLite PDO Common: PDOStatement::getColumnMeta [ext/pdo_sqlite/tests/pdo_022.phpt]  XFAIL REASON: This feature is not yet finalized, no test makes sense
Phar: bug #69958: Segfault in Phar::convertToData on invalid file [ext/phar/tests/bug69958.phpt]  XFAIL REASON: Still has memory leaks, see https://bugs.php.net/bug.php?id=70005
updateTimestamp never called when session data is empty [ext/session/tests/bug71162.phpt]  XFAIL REASON: Current session module is designed to write empty session always. In addition, current session module only supports SessionHandlerInterface only from PHP 7.0.
Bug #73529 session_decode() silently fails on wrong input [ext/session/tests/bug73529.phpt]  XFAIL REASON: session_decode() does not return proper status.
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #77020 (null pointer dereference in imap_mail) [ext/imap/tests/bug77020.phpt]
Bug #65729: CN_match gives false positive when wildcard is used [ext/openssl/tests/bug65729.phpt]
Bug #68265: SAN match fails with trailing DNS dot [ext/openssl/tests/bug68265.phpt]
Bug #68879: Match IP address fields in subjectAltName checks [ext/openssl/tests/bug68879.phpt]
Bug #68920: peer_fingerprint input checks should be strict [ext/openssl/tests/bug68920.phpt]
Bug #69215: Crypto servers should send client CA list [ext/openssl/tests/bug69215.phpt]
Peer verification matches SAN names [ext/openssl/tests/san_peer_matching.phpt]
security_level setting to prohibit cert [ext/openssl/tests/stream_security_level.phpt]
Specific crypto method for ssl:// transports. [ext/openssl/tests/streams_crypto_method.phpt]
tls stream wrapper with min version 1.0 and max version 1.1 [ext/openssl/tests/tls_min_v1.0_max_v1.1_wrapper.phpt]
tls stream wrapper [ext/openssl/tests/tls_wrapper.phpt]
tls stream wrapper when TLS 1.3 available [ext/openssl/tests/tls_wrapper_with_tls_v1.3.phpt]
tlsv1.0 stream wrapper [ext/openssl/tests/tlsv1.0_wrapper.phpt]
tlsv1.1 stream wrapper [ext/openssl/tests/tlsv1.1_wrapper.phpt]
tlsv1.2 stream wrapper [ext/openssl/tests/tlsv1.2_wrapper.phpt]
tlsv1.3 stream wrapper [ext/openssl/tests/tlsv1.3_wrapper.phpt]
Multicast support: IPv6 receive options [ext/sockets/tests/mcast_ipv6_recv.phpt]
=====================================================================

Attempts

Basic summary; not including countless rabbitholes, detours and revertions after unsuccessful attempts that modified the system.

  1. Tried dnf and remi.

    Could not specify **7.4.3**, just **7.4.14**.  Have PHP 72, 73 74, and 80, with 7.4.14 currently enabled.
    
  2. Compiled + installed PHP 8.0

    Mistake (did not know that '>= **7.4.3**' instructions evidently does not include >= 8.0)
    
    Note: naturally, because none of the programs could run on this version, it of course compiled/installed seamlessly, with not even one error (:
    
  3. New solution: compile 7.4.3 from source

    i. Got php 7.4.3 .tar from official PHP site; extracted it and did ./configure ...

    ii. Run ./configure ..., first error(s):

    Wrong version for PHP extensions
    
    Solution: almost all of the non-base PHP extensions needed their `-devel` version installed.
    

    iii. ./configure ... works now, so run make clean, make && make test

    make test errors: similar to the bugs below (under 'Errors'), but with at least twice as many because opcache

    Solution: Added `--disable-opcache --disable-opcache-file` to `./configure ...`
    

    iv. run make clean, make && make test as sudo again

    Where I am now.  Already have openssl-devel, and cannot find imap-devel or anything similar.
    

make procedure

To run ./configure without errors, had to install all the following with yum (excepting oniguruma, oniguruma-devel from DNF):

libcurl-devel, bzip2-devel, libpng-devel, libjpeg-devel, freetype-devel, libc-client-devel, libicu-devel, oniguruma, oniguruma-devel, postgresqlm, postgresql-devel, readline-devel, libsodium-devel, libxslt-devel, zip-devel, libsodium-devel, libxslt-devel, zip-devel

First successful:

% Used --disable-opcache --disable-opcache-file to get rid of opcache errors, since it is optional
sudo ./configure --prefix=/opt/php-7.4 --with-pdo-pgsql --with-zlib-dir --enable-ctype --with-freetype --enable-mbstring --enable-soap --enable-calendar --with-curl --with-zlib --enable-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --with-zip --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/lib/mysql/mysql.sock --with-jpeg --with-openssl --with-fpm-user=nginx --with-fpm-group=nginx --with-libdir=lib64 --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --disable-opcache --enable-intl --with-pear --enable-shmop --with-sodium --with-readline --enable-fpm

System Details

VPS, CentOS 8. Used as web and email server, with node.js for everything that is not the 3 PHP programs above.

Database: mariadb

Mail: postfix, dovecot, opendkim, opendmarc, spamassassin, clamav

Web: nginx

other:: php-fpm, MEAN stack, some LEMP (MediaWiki, Roundcube and PostfixAdmin)

2

1 Answer 1

1

I need to upgrade to PHP 7.4.3 (from 7.4.14)

You understand this is NOT an upgrade, but a downgrade, as 7.4.3 is older than 7.4.14 ?

Using your links.

From MediaWiki

Use PHP 7.4.3 or later instead.

From Roundcubemail

PHP version 5.4.1 or greater (and < 8.0 **)

From PostFixAdmin

Supports PHP7.0+

So 7.4.14 is fine, I don't understand why you think you need exactly 7.4.3, which have lot of security issues (fixed in more recent versions)

Indeed, my repository only have the 2 last minor versions online (so 7.4.13 and 7.4.14 for now), but you can request older, when "really" needed on the forum

2
  • Oh dear I'm an idiot. For some reason, on a deep subconscious level I was reading .3 as an implied .30, even though I know better. I'm almost too embarrassed for words.
    – SKNB
    Jan 20, 2021 at 17:16
  • By the way, if you're the real @remi I'm a big fan. Thank you for both your response, and for making the internet work. cheers m8
    – SKNB
    Jan 20, 2021 at 17:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .