systemart / rtgui

Automatically exported from code.google.com/p/rtgui
0 stars 0 forks source link

"Value is not an array" With lots of open torrents #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have around 60 torrents seeding and i'm getting this error:

Notice: xmlrpc: Value is not an array (-501) in
/var/www/rtgui/functions.php on line 23

In the rtorrent log it shows lots of this:
(10:07:28) PeerConnectionSeed::read_message() got an invalid message length.
(10:07:33) Received unsupported message type.
(10:07:55) PeerConnectionSeed::read_message() got an invalid message length.
(10:07:56) PeerConnectionSeed::read_message() got an invalid message length.
(10:07:56) PeerConnectionSeed::read_message() got an invalid message length.
(10:07:58) PeerConnectionSeed::read_message() got an invalid message length.
(10:08:00) PeerConnectionSeed::read_message() got an invalid message length.
(10:08:50) Received unsupported message type.
(10:08:55) PeerConnectionSeed::read_message() got an invalid message length.
(10:08:55) PeerConnectionSeed::read_message() got an invalid message length.

It still displays rtorrent versions and avaiable disk space. It doesn't
give me errors on the stopped or incomplete torrent tabs unless there's a
torrent in one of them.

It's a ubuntu 7.04 server with rTorrent 0.7.9/0.11.9 and rtGui v0.2.2 

Anything else I need to supply? Thanks in advance for the help.

Original issue reported on code.google.com by star...@gmail.com on 28 Jan 2008 at 10:15

GoogleCodeExporter commented 9 years ago
I located the problem,

One of the torrents has a strange symbol in it. A Cross. Removed the torrent 
and it
fixed the problem. Maybe this needs better handling of odd characters?

Original comment by star...@gmail.com on 28 Jan 2008 at 10:22

GoogleCodeExporter commented 9 years ago
† < this was the character.

Original comment by star...@gmail.com on 28 Jan 2008 at 10:23

GoogleCodeExporter commented 9 years ago
This is probably also relevant to issue #26

The problem seems to be that xmlrpc_decode does not handle UTF-8 encoded 
characters 
correctly, even if used like this: xmlrpc_decode($file, "UTF-8");

A dodgy fix is to string utf8 characters: xmlrpc_decode(utf8_decode($file));

Seeing as the xmlrpc functions are marked as experimental in PHP, and have been 
for a 
long time, perhaps it's a good idea to move to a better xmlrpc implementation - 
such 
as http://phpxmlrpc.sourceforge.net/

Original comment by waikur...@gmail.com on 26 Sep 2008 at 2:06

GoogleCodeExporter commented 9 years ago
I meant to say "strip" not "string" in the previous comment.

Original comment by waikur...@gmail.com on 26 Sep 2008 at 2:06

GoogleCodeExporter commented 9 years ago
In the interest of helping people fix this problem, here is how you apply the 
fix:

around line 25 in functions.php replace this line:
      return xmlrpc_decode($file);
with:
      return xmlrpc_decode(utf8_decode($file));

Any special characters will get replaced with ?, it sucks but at least rtgui 
will 
work correctly.

Original comment by waikur...@gmail.com on 26 Sep 2008 at 2:11

GoogleCodeExporter commented 9 years ago
Pages now utf-8

Original comment by lemonbe...@gmail.com on 5 Dec 2008 at 10:32