HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Problem with monitorSystemUpdate in another languages (http://www.howtoforge.com/forums/showthread.php?t=62361)

mrtnzlml 24th June 2013 22:19

Problem with monitorSystemUpdate in another languages
 
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])


till 25th June 2013 11:18

The proposed solution is fine for me.


All times are GMT +2. The time now is 18:33.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.