Problem with monitorSystemUpdate in another languages

Discussion in 'Developers' Forum' started by mrtnzlml, Jun 24, 2013.

  1. mrtnzlml

    mrtnzlml New Member

    Hi, we have problem with encoding of function shell_exec called in /usr/local/ispconfig/server/bil/classes/monitor_tools.inc.php on line 900. This function updating database with result of shell_exec('apt-get -s -q dist-upgrade'). But in (for example) czech, this function returns result with bad encoding and monitor of updates doesn't work. It returns something like 'a:1:{s:6:"output";s:3604:"Ä'. It's uncomplete and unable to unserialize. There are few possible ways how to fix that, but I think, that the best is call with this function shell_exec('apt-get -s -qq dist-upgrade'). In this result is enough informations. What do you mean?

    Example of new output:
    Code:
    Inst libpython2.7 [2.7.3-0ubuntu3.1] (2.7.3-0ubuntu3.2 Ubuntu:12.04/precise-updates [amd64]) []
    Inst python2.7 [2.7.3-0ubuntu3.1] (2.7.3-0ubuntu3.2 Ubuntu:12.04/precise-updates [amd64]) []
    Inst python2.7-minimal [2.7.3-0ubuntu3.1] (2.7.3-0ubuntu3.2 Ubuntu:12.04/precise-updates [amd64])
    Conf python2.7-minimal (2.7.3-0ubuntu3.2 Ubuntu:12.04/precise-updates [amd64])
    Inst python-minimal [2.7.3-0ubuntu2] (2.7.3-0ubuntu2.2 Ubuntu:12.04/precise-updates [amd64]) [python:amd64 ]
    Conf python-minimal (2.7.3-0ubuntu2.2 Ubuntu:12.04/precise-updates [amd64]) [python:amd64 ]
    Inst python [2.7.3-0ubuntu2] (2.7.3-0ubuntu2.2 Ubuntu:12.04/precise-updates [amd64])
    Inst linux-image-3.2.0-48-generic (3.2.0-48.74 Ubuntu:12.04/precise-updates [amd64])
    Inst libterm-readkey-perl (2.30-4build3 Ubuntu:12.04/precise [amd64])
    Inst mysql-client-5.5 [5.5.29-0ubuntu0.12.04.1] (5.5.31-0ubuntu0.12.04.2 Ubuntu:12.04/precise-updates [amd64])
    Inst mysql-server-5.5 [5.5.29-0ubuntu0.12.04.1] (5.5.31-0ubuntu0.12.04.2 Ubuntu:12.04/precise-updates [amd64]) []
    Inst mysql-server-core-5.5 [5.5.29-0ubuntu0.12.04.1] (5.5.31-0ubuntu0.12.04.2 Ubuntu:12.04/precise-updates [amd64])
    Inst fail2ban [0.8.6-3] (0.8.6-3wheezy2build0.12.04.1 Ubuntu:12.04/precise-updates [all])
    Inst linux-headers-3.2.0-48 (3.2.0-48.74 Ubuntu:12.04/precise-updates [all])
    Inst linux-headers-3.2.0-48-generic (3.2.0-48.74 Ubuntu:12.04/precise-updates [amd64])
    Inst linux-server [3.2.0.40.48] (3.2.0.48.58 Ubuntu:12.04/precise-updates [amd64]) []
    Inst linux-image-server [3.2.0.40.48] (3.2.0.48.58 Ubuntu:12.04/precise-updates [amd64]) []
    Inst linux-headers-server [3.2.0.40.48] (3.2.0.48.58 Ubuntu:12.04/precise-updates [amd64])
    Conf python2.7 (2.7.3-0ubuntu3.2 Ubuntu:12.04/precise-updates [amd64])
    Conf libpython2.7 (2.7.3-0ubuntu3.2 Ubuntu:12.04/precise-updates [amd64])
    Conf python (2.7.3-0ubuntu2.2 Ubuntu:12.04/precise-updates [amd64])
    Conf linux-image-3.2.0-48-generic (3.2.0-48.74 Ubuntu:12.04/precise-updates [amd64])
    Conf libterm-readkey-perl (2.30-4build3 Ubuntu:12.04/precise [amd64])
    Conf mysql-client-5.5 (5.5.31-0ubuntu0.12.04.2 Ubuntu:12.04/precise-updates [amd64])
    Conf mysql-server-core-5.5 (5.5.31-0ubuntu0.12.04.2 Ubuntu:12.04/precise-updates [amd64])
    Conf mysql-server-5.5 (5.5.31-0ubuntu0.12.04.2 Ubuntu:12.04/precise-updates [amd64])
    Conf fail2ban (0.8.6-3wheezy2build0.12.04.1 Ubuntu:12.04/precise-updates [all])
    Conf linux-headers-3.2.0-48 (3.2.0-48.74 Ubuntu:12.04/precise-updates [all])
    Conf linux-headers-3.2.0-48-generic (3.2.0-48.74 Ubuntu:12.04/precise-updates [amd64])
    Conf linux-image-server (3.2.0.48.58 Ubuntu:12.04/precise-updates [amd64])
    Conf linux-headers-server (3.2.0.48.58 Ubuntu:12.04/precise-updates [amd64])
    Conf linux-server (3.2.0.48.58 Ubuntu:12.04/precise-updates [amd64])
    
     
  2. till

    till Super Moderator

    The proposed solution is fine for me.
     

Share This Page