Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Z-Push with Zimbra backend PHP 8.0 not working

    General usage of Z-Push
    php 8.0
    7
    19
    6984
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • derritter88
      derritter88 last edited by

      Hello there,
      I recently migrated my Zimbra installation from CentOS to Ubuntu 18.04 (worked fine) and also decided to give PHP 8.0 a try as the Z-Push developer was able to fix some issues -> https://sourceforge.net/p/zimbrabackend/feature-requests/27/

      BUT unfortunately it seems that Z-Push itself is having some issues as I get following error

      08/10/2021 21:42:51 [19639] [FATAL] [email-address] Fatal error: /usr/share/z-push/backend/ipcsharedmemory/ipcsharedmemoryprovider.php:45 - Uncaught Error: Object of class SysvSemaphore could not be converted to string in /usr/share/z-push/backend/ipcsharedmemory/ipcsharedmemoryprovider.php:45
      Stack trace:
      #0 /usr/share/z-push/backend/ipcsharedmemory/ipcsharedmemoryprovider.php(45): sprintf()
      #1 /usr/share/z-push/lib/core/interprocessdata.php(93): IpcSharedMemoryProvider->__construct()
      #2 /usr/share/z-push/lib/core/topcollector.php(49): InterProcessData->__construct()
      #3 /usr/share/z-push/lib/core/zpush.php(538): TopCollector->__construct()
      #4 /usr/share/z-push/lib/core/devicemanager.php(87): ZPush::GetTopCollector()
      #5 /usr/share/z-push/lib/core/zpush.php(510): DeviceManager->__construct()
      #6 /usr/share/z-push/lib/default/backend.php(316): ZPush::GetDeviceManager()
      #7 /usr/share/z-push/backend/zimbra/zimbra.php(985): Backend->InitializePermanentStorage()
      #8 /usr/share/z-push/lib/request/requestprocessor.php(68): BackendZimbra->Logon()
      #9 /usr/share/z-push/index.php(86): RequestProcessor::Authenticate()
      #10 {main}
        thrown (1)
      

      When reenabling PHP 7.3 it worked without any issues.

      Beside the IPC Sharedstorage I have also tried to use IPC Memcached but this does also not work.

      Are there any planned development to have PHP 8.0 officially supported by Z-Push?

      1 Reply Last reply Reply Quote 0
      • bob4os
        bob4os last edited by

        There is a existing Jira ticket with this issue, but nobody fixed it yet.
        I am willing to help, but I do not know, if pull requests from the community are welcome anymore.

        Can you post the error you experienced with IPC Memcached too?

        derritter88 1 Reply Last reply Reply Quote 0
        • derritter88
          derritter88 @bob4os last edited by

          @bob4os hi there!
          Unfortunately I cannot find any details in my historical logs (even from backups) but as far as I have in mind the log entries for IPC memcached looked like this:

          08/10/2021 22:27:13 [  462] [WARN] [emailaddress@emaildomain.tld] Zimbra->GetUserInfo():   Overriding ZIMBRA_URL [https://mail.emaildomain.tld] from config.php with ZIMBRA publicURL [https://mail.emaildomain.tld:8443]
          08/10/2021 22:27:13 [  462] [WARN] [emailaddress@emaildomain.tld] Zimbra->GetUserInfo():   Overriding  Logon URL [https://mail.emaildomain.tld/service/soap/] with ZIMBRA soapURL [https://mail.emaildomain.tld:8443/service/soap/]
          08/10/2021 22:27:13 [31653] [WARN] [emailaddress@emaildomain.tld] Zimbra->GetUserInfo():   Overriding ZIMBRA_URL [https://mail.emaildomain.tld] from config.php with ZIMBRA publicURL [https://mail.emaildomain.tld:8443]
          08/10/2021 22:27:13 [31653] [WARN] [emailaddress@emaildomain.tld] Zimbra->GetUserInfo():   Overriding  Logon URL [https://mail.emaildomain.tld/service/soap/] with ZIMBRA soapURL [https://mail.emaildomain.tld:8443/service/soap/]
          08/10/2021 22:27:13 [31010] [WARN] [emailaddress@emaildomain.tld] Zimbra->GetUserInfo():   Overriding ZIMBRA_URL [https://mail.emaildomain.tld] from config.php with ZIMBRA publicURL [https://mail.emaildomain.tld:8443]
          08/10/2021 22:27:13 [31010] [WARN] [emailaddress@emaildomain.tld] Zimbra->GetUserInfo():   Overriding  Logon URL [https://mail.emaildomain.tld/service/soap/] with ZIMBRA soapURL [https://mail.emaildomain.tld:8443/service/soap/]
          08/10/2021 22:27:13 [30707] [WARN] [emailaddress@emaildomain.tld] Zimbra->GetUserInfo():   Overriding ZIMBRA_URL [https://mail.emaildomain.tld] from config.php with ZIMBRA publicURL [https://mail.emaildomain.tld:8443]```
          
          
          A lot of same entries within a really short period of time (couple of seconds). 
          I stopped the Apache service after that.
          1 Reply Last reply Reply Quote 0
          • derritter88
            derritter88 last edited by

            The question I ask myself: Is Z-Push (independently of the backend) still only able to support PHP 7.3 or is it just because of the Zimbra backend?

            If it’s a PHP 7.3 issue then it might get a problem as the PHP version will be out of support in short future.

            1 Reply Last reply Reply Quote 0
            • bob4os
              bob4os last edited by

              Use PHP 7.4 - no issues there in my setup.

              derritter88 1 Reply Last reply Reply Quote 0
              • derritter88
                derritter88 @bob4os last edited by

                @bob4os with Zimbra backend?

                derritter88 1 Reply Last reply Reply Quote 0
                • derritter88
                  derritter88 @derritter88 last edited by

                  Okay tried it myself and seems to work with PHP 7.4 - nevertheless we should keep in mind that PHP 7.4 has active support until 28 November 2021 and security support until 28 November 2022.
                  Source

                  This gives us a year time until PHP 7.4 is no longer patched.

                  1 Reply Last reply Reply Quote 0
                  • bob4os
                    bob4os last edited by

                    I’m using the combined backend with caldav, carddav, imap, stickynotes and searchldap for GAL.
                    Yes, PHP 8 will be mandatory in a year.

                    1 Reply Last reply Reply Quote 0
                    • umgfoin
                      umgfoin last edited by umgfoin

                      Change (/usr/share/z-push)backend/ipcsharedmemoryprovider.php:45 as follows:

                      if ($this->initSharedMem())
                                ZLog::Write(LOGLEVEL_DEBUG, sprintf("%s(): Initialized %s and %s.", $class, $this->mutexid::class, $this->memid::class));
                      

                      Using backends kopano, ipcsharedmemory and sqlstatemachine, this seems to be the only showstopper for PHP 8.0, sofar.
                      ++umgfoin

                      Kordian 1 Reply Last reply Reply Quote 0
                      • mathias.rumbold
                        mathias.rumbold last edited by

                        I would definitly not migrate to Ubuntu 18.04 since all packages are already available for Ubuntu 20.04.

                        Important is that while the installation is happening to deactivate universe repositories to not have a mix with the packages in it.

                        You can activate it afterwards. And best is to stay if possible on the default system packages of the latest supported OS version since php7.4 is the system default php in Ubuntu 20.04. 18.04 is php7.2.

                        For php8.0 it will be supported with the support of Ubuntu 22.04, so it will take approx one more year if the development is in the same speed as of now.

                        danir.de 1 Reply Last reply Reply Quote 0
                        • danir.de
                          danir.de @mathias.rumbold last edited by

                          What is the current status here?
                          Is there any info yet about PHP 8.X support?

                          maedball 1 Reply Last reply Reply Quote 0
                          • maedball
                            maedball @danir.de last edited by maedball

                            I did the update because of Ubuntu 22.04:

                            by now i have had to fix two issues:

                            1. Memcache @umgfoin thanks again for the code ;-)
                            2. in my policies file i had to set maxattsize = -1 in my old version it was set to “” which caused z-push to not work.

                            It is now somehow working for (outlook (PC), ios, android). But i have been only using it for 4 days.

                            1 Reply Last reply Reply Quote 0
                            • Kordian
                              Kordian @umgfoin last edited by Kordian

                              @umgfoin Hello,
                              I have another issue with PHP8.1. Posted it here recently. 8.0 the same problem.

                              umgfoin 1 Reply Last reply Reply Quote 0
                              • umgfoin
                                umgfoin @Kordian last edited by

                                @kordian
                                Which problem are you referring to?
                                I’m not using the Zimbra-backend, so my PHP8.x-branch might not cover all functions required by this particular backend.

                                Kordian 1 Reply Last reply Reply Quote 0
                                • Kordian
                                  Kordian @umgfoin last edited by Kordian

                                  @umgfoin
                                  https://forum.kopano.io/topic/4047/z-push-php8-1-problem
                                  Seems to be z-push, not the backend problem.

                                  umgfoin 1 Reply Last reply Reply Quote 0
                                  • umgfoin
                                    umgfoin @Kordian last edited by

                                    @kordian said in Z-Push with Zimbra backend PHP 8.0 not working:

                                    Seems to be z-push, not the backend problem.

                                    Might be the case, but hard to debug without having a configured/working Zimbra-backend.
                                    You have to find out, when and why $this->{$map[self::STREAMER_VAR]} resolves (or implicitely casts) to string although a stream-object is expected in $encoder->contentStream(...).

                                    Kordian 2 Replies Last reply Reply Quote 0
                                    • Kordian
                                      Kordian @umgfoin last edited by

                                      @umgfoin
                                      Ha, thank you, but I am no programmer, so absolutely no idea what you are talking about :-)

                                      1 Reply Last reply Reply Quote 0
                                      • Kordian
                                        Kordian @umgfoin last edited by

                                        @umgfoin said in Z-Push with Zimbra backend PHP 8.0 not working:

                                        @kordian said in Z-Push with Zimbra backend PHP 8.0 not working:

                                        Seems to be z-push, not the backend problem.

                                        Might be the case, but hard to debug without having a configured/working Zimbra-backend.
                                        You have to find out, when and why $this->{$map[self::STREAMER_VAR]} resolves (or implicitely casts) to string although a stream-object is expected in $encoder->contentStream(...).

                                        Answer from backend:
                                        This error is not in the zimbra backend.

                                        The Z-Push core is not tested with PHP 8.0 as yet, never mind PHP 8.1

                                        There are a number of known issues that people have submitted fixes for to the z-push code repository but nobody at Kopano is picking up the pull requests so the code is just left sitting there.

                                        As I said, I have no knowledge to analyse.

                                        umgfoin 1 Reply Last reply Reply Quote 0
                                        • umgfoin
                                          umgfoin @Kordian last edited by

                                          @kordian said in Z-Push with Zimbra backend PHP 8.0 not working:

                                          The Z-Push core is not tested with PHP 8.0 as yet, never mind PHP 8.1

                                          Ah, I thought, you’re aware of this.
                                          Sure, z–push as of maintainer’s current release 2.6.2 is not PHP8.x ready.

                                          It’s certainly not only about testing and I have no information, whether the maintainers currently have time/ resources/ intention to do the necessary work or merge PRs.

                                          My PHP 8.x fork is work in progress and sufficiently stable to serve the kopano-backend (with a PHP8 MAPI-extension), but I never tested it against the requirements of the Zimbra-backend.

                                          ++umgfoin.

                                          1 Reply Last reply Reply Quote 1
                                          • First post
                                            Last post