hicklemr / rtgui

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

invalid argument supplied for foreach() #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install/setup lighttpd w/ php and xmlrpc
2. install/setup rtorrent
3. install/setup rtgui, browse to dir

What is the expected output? What do you see instead?

"Warning: Invalid argument supplied for foreach() in
/var/www/localhost/htdocs/rtgui/functions.php on line 26"

I get this at the top with no torrent info at all, just the skeleton of the ui.

Adding torrents (either url or file) works great, as does changing the
settings. 

What version of the product are you using? On what operating system?
lighttpd 1.14.18
PHP 5.2.6RC3-pl0-gentoo
rtorrent 0.8.0/0.12.0
rtgui 0.2.3
running gentoo linux with 2.6.24-gentoo-r3

Please provide any additional information below.
First, my apologies if this isn't an rtgui issue. If any other information
is needed, please let me know. Thank you for your work with this.

Original issue reported on code.google.com by rwloo...@gmail.com on 7 Apr 2008 at 3:18

GoogleCodeExporter commented 8 years ago
Can you confirm if the page lists torrents from rtorrent?  Or is is just the
information at the top - upload/download speed etc.

Original comment by lemonbe...@gmail.com on 9 Apr 2008 at 7:12

GoogleCodeExporter commented 8 years ago
it shows neither the up/down info or the torrent list
lighttpd throws this when browsing to rtgui index:

expat reports error code 5
        description: Invalid document end
        line: 1
        column: 1
        byte index: 0
        total bytes: 0

        data beginning 0 before byte index:

attached is a screenshot of what i see

Original comment by rwloo...@gmail.com on 11 Apr 2008 at 6:48

Attachments:

GoogleCodeExporter commented 8 years ago
Have you got some torrents loaded in rTorrent?  Although rtgui should be OK in 
this
case, I'm wondering if the problem is related.

Also, the error you mention regarding 'expat reports error code 5....' could be 
an
indication - I've got absolutely no idea what's causing that, so I'd re-check 
your
lighttpd config etc.

Original comment by lemonbe...@gmail.com on 11 Apr 2008 at 9:19

GoogleCodeExporter commented 8 years ago
yes, I have several torrents loaded into rTorrent. I've used rtgui to load them 
with
either the torrent file itself or the url, no problems.

my lighttpd.conf looks good, i'll check out everything else later tonight.

Original comment by rwloo...@gmail.com on 11 Apr 2008 at 7:00

GoogleCodeExporter commented 8 years ago
all of the config files look fine. attached are my php and lighttpd info

Original comment by rwloo...@gmail.com on 22 Apr 2008 at 9:32

Attachments:

GoogleCodeExporter commented 8 years ago
Confirmed. xmlrpc's return is empty when this bug occours. I think that it is 
not
rtGui's fault! I switched to Apache to fix this.

Original comment by rmi6...@gmail.com on 23 Apr 2008 at 4:26

GoogleCodeExporter commented 8 years ago
fixed the expat error, still getting the error on line 26 in functions.php

Original comment by rwloo...@gmail.com on 27 Apr 2008 at 4:44

GoogleCodeExporter commented 8 years ago
i had the same error.

do you have a non latin filename in your torrents? i had same problems, i 
changed
every page (though only some may need) to utf8 encoding and added 
"encoding_list =
UTF-8" in .rtorrent.rc file.

seems my problems were solved (though) i'm not exaclty sure. please verify if 
that is
the case.

Original comment by alberto...@gmail.com on 20 May 2008 at 7:22

GoogleCodeExporter commented 8 years ago
i have the same problem
Warning: Invalid argument supplied for foreach() in 
/var/www/rtgui/functions.php on
line 26
im using latest lighty+latest rtorrents

Original comment by dymofo on 26 May 2008 at 4:28

GoogleCodeExporter commented 8 years ago
dymofo - did you do what albertosgr suggested??

I can't replicate the problem...

Original comment by lemonbe...@gmail.com on 26 May 2008 at 6:05

GoogleCodeExporter commented 8 years ago
i tried albertosgr's suggestion, still getting the error. 

albertosgr: are you using lighttpd with rtgui/rtorrent?

Original comment by rwloo...@gmail.com on 29 Jun 2008 at 3:57

GoogleCodeExporter commented 8 years ago
no apache.

Original comment by alberto...@gmail.com on 3 Jul 2008 at 7:38

GoogleCodeExporter commented 8 years ago
I am having the same issue.
Running Ubuntu Server 8.04, using lazy apt-get to install apache/php5
custom compilation of xmlprc, rtorrent.
Latest rtGui.

I do have non-latin filename.

Original comment by bnff...@gmail.com on 16 Jul 2008 at 2:58

GoogleCodeExporter commented 8 years ago
Same issue here.

I discovered the offending file: There's an é char in some mkv filename. If I 
remove
that torrent rtgui works fine.

May someone be more specific about albertosgr fix? Specifically this step: "i 
changed
every page (though only some may need) to utf8 encoding".

Original comment by miguel.p...@gmail.com on 26 Jul 2008 at 2:46

GoogleCodeExporter commented 8 years ago
I believe, that this problem is connected to a name of a file. And by the name 
i mean the filename containing 
single quote character.

Original comment by louska...@gmail.com on 30 Sep 2008 at 6:55

GoogleCodeExporter commented 8 years ago
Can't reproduce

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

GoogleCodeExporter commented 8 years ago
My problems was becouse one of the torrents was named with a "/". Somehow the 
slash
broke the function. I'm no php-programmer but isn't that easily programmable 
with
some kind of string-check?

Maybe converting strings to ascii or something. 

Original comment by dnlns...@gmail.com on 31 Dec 2008 at 10:12