Bug 272451 - databases/pecl-redis: php8.1 PHP Fatal error: Arginfo / zpp mismatch during call of Redis::pconnect()
Summary: databases/pecl-redis: php8.1 PHP Fatal error: Arginfo / zpp mismatch during c...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL: https://github.com/phpredis/phpredis/...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-11 13:20 UTC by Vladimir Druzenko
Modified: 2023-07-12 13:46 UTC (History)
1 user (show)

See Also:
daniel: maintainer-feedback+
vvd: maintainer-feedback?
vvd: merge-quarterly?


Attachments
Workaround for "Arginfo / zpp mismatch during call of Redis::pconnect()" (944 bytes, patch)
2023-07-11 13:20 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2023-07-11 13:20:53 UTC
Created attachment 243341 [details]
Workaround for "Arginfo / zpp mismatch during call of Redis::pconnect()"

PHP Fatal error:  Arginfo / zpp mismatch during call of Redis::pconnect() in nextcloud/lib/private/RedisFactory.php on line 137

This line of the nextcloud/lib/private/RedisFactory.php:
$this->instance->pconnect($host, $port, $timeout, null, 0, $readTimeout);

Environment:
    FreeBSD 13.2-p1 amd64
    php 8.1.21
    php81-pecl-redis-5.3.7
    redis 7.0.12
    nextcloud 27.0.0.8

Details are at upstream issue: https://github.com/phpredis/phpredis/issues/2041
Bug was fixed in develop branch, but no release after this.

So workaround is to build with patch:
--- redis.c.orig        2022-02-15 18:25:22 UTC
+++ redis.c
@@ -154,6 +154,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pconnect, 0, 0, 1)
     ZEND_ARG_INFO(0, host)
     ZEND_ARG_INFO(0, port)
     ZEND_ARG_INFO(0, timeout)
+    ZEND_ARG_INFO(0, persistent_id)
+    ZEND_ARG_INFO(0, retry_interval)
+    ZEND_ARG_INFO(0, read_timeout)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_mget, 0, 0, 1)
Comment 1 Daniel Ylitalo 2023-07-12 07:36:49 UTC
Looks good to me, thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-07-12 13:40:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e85832720f02bd37c3f9ebe5e97ae648798b6922

commit e85832720f02bd37c3f9ebe5e97ae648798b6922
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-07-12 13:32:11 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-07-12 13:32:11 +0000

    databases/pecl-redis: php8.1 PHP Fatal error: Arginfo / zpp mismatch during call of Redis::pconnect()

    Without patch port doesn't work with PHP 8.1 and probably with 8.0, 8.2 and 8.3 too.
    Upstream issue: https://github.com/phpredis/phpredis/issues/2041

    PR:                     272451
    Approved by:            Daniel Ylitalo <daniel@blodan.se> (maintainer), arrowd (mentor)
    Obtained from:          https://github.com/phpredis/phpredis/issues/2041
    Differential Revision:  https://reviews.freebsd.org/D40984
    MFH:                    2023Q3

 databases/pecl-redis/files/patch-redis.c (new) | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-07-12 13:43:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d3acc2daf535c754a0173bffb08dd1cfb28f5df7

commit d3acc2daf535c754a0173bffb08dd1cfb28f5df7
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-07-12 13:41:50 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-07-12 13:41:50 +0000

    databases/pecl-redis: php8.1 PHP Fatal error: Arginfo / zpp mismatch during call of Redis::pconnect()

    Without patch port doesn't work with PHP 8.1 and probably with 8.0, 8.2 and 8.3 too.
    Upstream issue: https://github.com/phpredis/phpredis/issues/2041

    PR:                     272451
    Approved by:            Daniel Ylitalo <daniel@blodan.se> (maintainer), arrowd (mentor)
    Obtained from:          https://github.com/phpredis/phpredis/issues/2041
    Differential Revision:  https://reviews.freebsd.org/D40984
    MFH:                    2023Q3

 databases/pecl-redis/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-07-12 13:45:25 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=42b02a73018c140011863d5316042936933c530e

commit 42b02a73018c140011863d5316042936933c530e
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-07-12 13:41:50 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-07-12 13:44:13 +0000

    databases/pecl-redis: php8.1 PHP Fatal error: Arginfo / zpp mismatch during call of Redis::pconnect()

    Without patch port doesn't work with PHP 8.1 and probably with 8.0, 8.2 and 8.3 too.
    Upstream issue: https://github.com/phpredis/phpredis/issues/2041

    PR:                     272451
    Approved by:            Daniel Ylitalo <daniel@blodan.se> (maintainer), arrowd (mentor)
    Obtained from:          https://github.com/phpredis/phpredis/issues/2041
    Differential Revision:  https://reviews.freebsd.org/D40984
    MFH:                    2023Q3

    (cherry picked from commit d3acc2daf535c754a0173bffb08dd1cfb28f5df7)

 databases/pecl-redis/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-07-12 13:45:26 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c9236835b4f94133fac85ba87b20ab170ca5c7a1

commit c9236835b4f94133fac85ba87b20ab170ca5c7a1
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-07-12 13:32:11 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-07-12 13:44:05 +0000

    databases/pecl-redis: php8.1 PHP Fatal error: Arginfo / zpp mismatch during call of Redis::pconnect()

    Without patch port doesn't work with PHP 8.1 and probably with 8.0, 8.2 and 8.3 too.
    Upstream issue: https://github.com/phpredis/phpredis/issues/2041

    PR:                     272451
    Approved by:            Daniel Ylitalo <daniel@blodan.se> (maintainer), arrowd (mentor)
    Obtained from:          https://github.com/phpredis/phpredis/issues/2041
    Differential Revision:  https://reviews.freebsd.org/D40984
    MFH:                    2023Q3

    (cherry picked from commit e85832720f02bd37c3f9ebe5e97ae648798b6922)

 databases/pecl-redis/files/patch-redis.c (new) | 12 ++++++++++++
 1 file changed, 12 insertions(+)