Bug#597595: Error loading XML document
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 retitle 597595 Use of php deprecated function split() thanks I forwarded this issue to phpsysinfo upstream See also https://sourceforge.net/tracker/?func=detailaid=3292961group_id=15atid=100015 Cheers Bjoern -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk22d90ACgkQABMWRpwdNulx0ACgvIMpcJ+4KA3ABaEdq4qY/FEj cdEAoMr7yCfWeAjgCAzEukDZYXEPMkNp =2uXu -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#597595: Error loading XML document
On Tue, 19 Apr 2011 14:05:58 +0200, Bjoern Boschman wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi folks, I've checked Willian's patch which does not seem to be included in upstream by now. phpsysinfo still uses preg_split() Can you please verify that this still causes problems, so that I can open a corresponding bugreport for upstream? Cheers Bjoern -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2teqYACgkQABMWRpwdNukvIwCdExkMWRQ1YcQ5s4iGh0qHYgoS VI4An3+mm9aXuZtDVZvO5RAWaq1CyM+v =/JfH -END PGP SIGNATURE- Hi Bjoern, The errors I get are many of these: Deprecated: Function split() is deprecated in /usr/share/phpsysinfo/includes/common_functions.php on line 64 So replacing split with explode seems to solve this.. -- Emmanuel Revah -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#597595: Error loading XML document
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi folks, I've checked Willian's patch which does not seem to be included in upstream by now. phpsysinfo still uses preg_split() Can you please verify that this still causes problems, so that I can open a corresponding bugreport for upstream? Cheers Bjoern -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2teqYACgkQABMWRpwdNukvIwCdExkMWRQ1YcQ5s4iGh0qHYgoS VI4An3+mm9aXuZtDVZvO5RAWaq1CyM+v =/JfH -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#597595: Error loading XML document
I've created a patch. Somente em ./debian: files Somente em ./debian: phpsysinfo Somente em ./debian: phpsysinfo.debhelper.log Somente em ./debian: phpsysinfo.substvars Somente em ./debian: stamp-patched diff -urp ./includes/common_functions.php /tmp/phpsysinfo-3.0~rc6//includes/common_functions.php --- ./includes/common_functions.php 2011-02-13 22:44:24.0 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/common_functions.php 2008-06-05 15:58:52.0 -0300 @@ -61,7 +61,7 @@ function execute_program($strProgramname } // see if we've gotten a |, if we have we need to do patch checking on the cmd if ($strArgs) { -$arrArgs = preg_split('/ /', $strArgs); +$arrArgs = split(' ', $strArgs); for ($i = 0;$i count($arrArgs);$i++) { if ($arrArgs[$i] == '|') { $strCmd = $arrArgs[$i+1]; diff -urp ./includes/mb/class.mbm5.inc.php /tmp/phpsysinfo-3.0~rc6//includes/mb/class.mbm5.inc.php --- ./includes/mb/class.mbm5.inc.php 2011-02-13 22:30:30.0 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/mb/class.mbm5.inc.php 2008-06-05 15:58:52.0 -0300 @@ -31,9 +31,9 @@ class mbinfo { } else { $delim = ;; } -$buffer = preg_split(\n, $buffer); -$this-buf_label = preg_split($delim, substr($buffer[0], 0, -2)); -$this-buf_value = preg_split($delim, substr($buffer[1], 0, -2)); +$buffer = split(\n, $buffer); +$this-buf_label = split($delim, substr($buffer[0], 0, -2)); +$this-buf_value = split($delim, substr($buffer[1], 0, -2)); } public function temperature() { $results = array(); diff -urp ./includes/os/class.BSD.common.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.BSD.common.inc.php --- ./includes/os/class.BSD.common.inc.php 2011-02-13 22:49:43.0 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.BSD.common.inc.php 2008-06-05 15:58:52.0 -0300 @@ -242,7 +242,7 @@ class bsd_common { if (!execute_program('vmstat', '', $pstat, $this-debug)) { $pstat = ''; } -$lines = preg_split(/\n/, $pstat); +$lines = split(\n, $pstat); for ($i = 0, $max = sizeof($lines);$i $max;$i++) { $ar_buf = preg_split(/\s+/, $lines[$i], 19); if ($i == 2) { @@ -268,7 +268,7 @@ class bsd_common { $pstat = ''; } } -$lines = preg_split(/\n/, $pstat); +$lines = split(\n, $pstat); $results['swap']['total'] = 0; $results['swap']['used'] = 0; $results['swap']['free'] = 0; diff -urp ./includes/os/class.Darwin.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.Darwin.inc.php --- ./includes/os/class.Darwin.inc.php 2011-02-13 22:52:18.0 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.Darwin.inc.php 2008-06-05 15:58:52.0 -0300 @@ -93,7 +93,7 @@ class sysinfo extends bsd_common { public function pci() { $results = array(); $s = $this-grab_ioreg('IOPCIDevice'); -$lines = preg_split(/\n/, $s); +$lines = split(\n, $s); for ($i = 0, $max = sizeof($lines);$i $max;$i++) { $ar_buf = preg_split(/\s+/, $lines[$i], 19); $results[$i] = $ar_buf[0]; @@ -106,7 +106,7 @@ class sysinfo extends bsd_common { $results = array(); // ioreg | grep Media class IOMedia $s = $this-grab_ioreg('IOATABlockStorageDevice'); -$lines = preg_split(/\n/, $s); +$lines = split(\n, $s); $j = 0; for ($i = 0, $max = sizeof($lines);$i $max;$i++) { $ar_buf = preg_split(/\/\//, $lines[$i], 19); @@ -125,7 +125,7 @@ class sysinfo extends bsd_common { if (!execute_program('vm_stat', '', $pstat, $this-debug)) { $pstat = ''; } -$lines = preg_split(/\n/, $pstat); +$lines = split(\n, $pstat); for ($i = 0, $max = sizeof($lines);$i $max;$i++) { $ar_buf = preg_split(/\s+/, $lines[$i], 19); if ($i == 1) { @@ -142,7 +142,7 @@ class sysinfo extends bsd_common { // need to fix the swap info... // meanwhile silence and / or disable the swap information if (execute_program('swapinfo', '-k', $pstat, $this-debug)) { - $lines = preg_split(/\n/, $pstat); + $lines = split(\n, $pstat); for ($i = 0, $max = sizeof($lines);$i $max;$i++) { $ar_buf = preg_split(/\s+/, $lines[$i], 6); if ($i == 0) { @@ -162,7 +162,7 @@ class sysinfo extends bsd_common { } public function network() { if (execute_program('netstat', '-nbdi | cut -c1-24,42- | grep Link', $netstat, $this-debug)) { - $lines = preg_split(/\n/, $netstat); + $lines = split(\n, $netstat); $results = array(); for ($i = 0, $max = sizeof($lines);$i $max;$i++) { $ar_buf = preg_split(/\s+/, $lines[$i], 10); diff -urp ./includes/os/class.FreeBSD.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.FreeBSD.inc.php --- ./includes/os/class.FreeBSD.inc.php 2011-02-13 22:51:45.0 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.FreeBSD.inc.php 2008-06-05 15:58:52.0 -0300 @@ -48,7 +48,7 @@ class sysinfo extends bsd_common {
Bug#597595: Error loading XML document
Package: phpsysinfo Version: 3.0~rc6-1.1 Severity: important When trying to launch phpsysinfo from a browser : http://localhost/phpsysinfo/ we first get a redirect to http://localhost/phpsysinfo/index.php?disp=dynamic with a Loading... please wait! html message then an alert popup Error loading XML document and nothing more. Looking in error.log we found the cause of the problem : Use of php deprecated function split() - error Problem still present at 2010-09-21 after an aptitude update + upgrade -- Bug data: Debian : squeeze/sid Php : PHP 5.3.2-2 with Suhosin-Patch (cli) (built: Jul 19 2010 01:22:58) /var/log/nginx/access.log : localhost - [21/Sep/2010:06:08:21 +0200] GET /+/phpsysinfo/ HTTP/1.1 200 572 Mozilla/5.0 localhost - [21/Sep/2010:06:08:21 +0200] GET /+/phpsysinfo/index.php?disp=dynamic HTTP/1.1 200 1861 http://localhost/phpsysinfo/; Mozilla/5.0 /var/log/nginx/error.log : 2010/09/21 05:15:02 [error] 2597#0: *180 FastCGI sent in stderr: PHP Deprecated: Function split() is deprecated in /usr/share/phpsysinfo/includes/common_functions.php on line 64 http://php.net/split : This function has been DEPRECATED as of PHP 5.3.0. # grep error_reporting\ = /etc/php5/cgi/php.ini error_reporting = E_ALL | E_STRICT # grep error_reporting\ = /usr/share/doc/php5-common/examples/php.ini-development error_reporting = E_ALL | E_STRICT -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.34.6 x86_64 (SMP w/1 CPU core) Glibc : 2.11.2-5 Locale: LANG=en_US.UTF8, LC_CTYPE=en_US.UTF8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages phpsysinfo depends on: ii nginx [httpd] 0.7.67-3 small, but very powerful and effic ii php5 5.3.2-2server-side, HTML-embedded scripti phpsysinfo recommends no packages. Versions of packages phpsysinfo suggests: ii hddtemp0.3-beta15-46 hard drive temperature monitoring ii lm-sensors 1:3.1.2-6 utilities to read temperature/volt -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org