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

    Error with attachment

    Kopano WebApp
    2
    3
    1254
    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.
    • avocat
      avocat last edited by

      Versions
      openSUSE Tumbleweed
      Kopano 8.4.0~344-77.1
      WebApp 3.3.0.600-429.1
      Apache 2.4.25-5.1
      PHP 7.1.4-1.1

      Problem
      After attachment upload (WebApp) I always get an “HTTP 500 Internal Server Error”.

      Apache error log:
      [Thu Apr 27 18:50:04.797864 2017] [php7:error] [pid 8772] [client xxx:64308] PHP Fatal error: Uncaught Error: Using $this when not in object context in /usr/share/kopano-webapp/server/includes/upload_attachment.php:81
      Stack trace:
      #0 /usr/share/kopano-webapp/server/includes/load.php(39): include()
      #1 /usr/share/kopano-webapp/index.php(167): include(’/usr/share/kopa…’)
      #2 {main}
      thrown in /usr/share/kopano-webapp/server/includes/upload_attachment.php on line 81, referer: https://xxx/webapp/

      Workaround (disable plugin hook)
      Remove following part in /usr/share/kopano-webapp/server/includes/upload_attachment.php

                                          $GLOBALS['PluginManager']->triggerHook('server.upload_attachment.upload', array(
                                                  'moduleObject' =>& $this,
                                                  'tmpname'  => $attachment_state->getAttachmentPath($attachid),
                                                  'name' => $filename,
                                                  'size' => $FILE['size'],
                                                  'sourcetype' => $sourcetype,
                                                  'returnfiles' =>& $returnfiles
                                          ));
      

      Help?
      I’m not a php expert and don’t relay know what $this means in that context. Could someone help me to reenable the plugin hook?

      1 Reply Last reply Reply Quote 0
      • marty
        marty Kopano (Inactive) last edited by

        Could be related:
        https://jira.kopano.io/browse/KW-1291

        I’ve added your case in the ticket, so that will be checked soon.

        https://documentation.kopano.io/deskapp_admin_manual
        http://documentation.kopano.io/webapp_smime_manual
        https://documentation.kopano.io/webapp_admin_manual

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

          Hi Marty

          That is exactly the issue, thanks for fixing it :-).

          Regards

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