PirateBox 0.6.3 - Chatbox problem

Posted by dataminer 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
PirateBox 0.6.3 - Chatbox problem
May 03, 2013 11:33PM
Installed a fresh piratebox 0.6.3 on my new MR-3040.

The only problem now is following:
Typing into chatfield -> no problem.
Data is correctly stored into "/cgi-bin/data.pso" file.

But nothing of this comes up within the main chat frame.
Anyone an ideas what could cause this problem? A bug?
Re: PirateBox 0.6.3 - Chatbox problem
May 04, 2013 07:51AM
which browser? Does it still stuck, when you press F5 and retry?


you may test:
piratebox.lan/chat.html (old version)
Re: PirateBox 0.6.3 - Chatbox problem
May 05, 2013 10:15PM
Firefox / IE10 or chat.html all the same: No output from data.pso.
Re: PirateBox 0.6.3 - Chatbox problem
May 06, 2013 12:26PM
I experienced the same for IE. Firefox did show up but only after the page was refreshed.
Re: PirateBox 0.6.3 - Chatbox problem
May 06, 2013 06:33PM
works on chat.html => JS problem (we need a JS experienced guy to get this working)
Don't works on chat.html => general problem with shoutbox. (check /opt/piratebox/tmp/error.log for error-output)
Re: PirateBox 0.6.3 - Chatbox problem
May 07, 2013 08:58AM
Think the only problem is that "data.pso" (the file with saved chats) is not included correctly.
Checked it with firebug but dont get any errors.
Re: PirateBox 0.6.3 - Chatbox problem
May 07, 2013 09:06AM
data.pso has nothing to do with the frontend (in the browser) scripts. It is used in the background by the python-scripty on the PirateBox itself.

/opt/piratebox/www/cgi-bin/data.pso

Does this file change?
Does it have the correct permissions?
Was something changed in piratebox.conf ?

Matthias
Re: PirateBox 0.6.3 - Chatbox problem
May 07, 2013 09:30AM
Matthias Wrote:
-------------------------------------------------------
> Does this file change?
> Does it have the correct permissions?
> Was something changed in piratebox.conf ?

Yes, every new shoutbox comment is correctly saved into this file.
Yes, permissions are correct, even if set to 755 or 777.
Yes, it was changed to "do not reset chat".

Think theres an error in python data.pso-read script, which changed since 0.6.3.
Matthias Wrote:
-------------------------------------------------------
> data.pso has nothing to do with the frontend (in
> the browser) scripts. It is used in the background
> by the python-scripty on the PirateBox itself.

If it does not have anything to do with frontend:
Why is it existing?!

I thought this file is beeing loaded into frontend to show last chat-comments, isnt it?
Where does the chat (frontend) gets it data from?

... Just for my understanding.
Re: PirateBox 0.6.3 - Chatbox problem
May 21, 2013 06:33AM
data.pso is used in background for saving the chat messages.
But during saving that message into data.pso, there is an extra file called "chat.html" written down to the www folder. This chat.html is read by JavaScript to display the chat messages. We made this kind of "pre-compile", because the Chat will be more often displayed then something is posted.

You can do a "fallback" to the old version (where data.pso is read), using
Language: PHP
piratebox.lan/chat.html

Regards
Matthias
Re: PirateBox 0.6.3 - Chatbox problem
May 27, 2013 09:56PM
Matthias Wrote:
-------------------------------------------------------
> You can do a "fallback" to the old version (where
> data.pso is read), using piratebox.lan/chat.html

Still nothing. sad smiley

Whats the easiest way to "reset" or reinstall the whole piratebox und my MR3040?
Re: PirateBox 0.6.3 - Chatbox problem
May 28, 2013 04:21AM
did u already check the
/opt/piratebox/tmp/break.log
after u tried piratebox.lan/chat.html ??
There HAVE to be some hint about what it going on...
Re: PirateBox 0.6.3 - Chatbox problem
May 30, 2013 05:56PM
@Matthias

The file /opt/piratebox/tmp/break.log SOLVED my problems! Wohooo!

A simple style.css was missing. sad smiley

Thank you sooo much!
Re: PirateBox 0.6.3 - Chatbox problem
May 31, 2013 06:06AM
Sorry to revive an old thread, but I'm experiencing similar problems on my chat. In IE10 (can't test other browsers) the text only appears when I refresh the page. I see the chat in data.pso and chat.html, but when I visit piratebox.lan/chat.html, I get perpetual errors and only see "ok" in the chat area. break.log is blank, but error.log reads:

2013-07-01 07:04:03: (log.c.166) server started 
2013-07-01 07:04:03: (server.c.987) WARNING: unknown config-key: url.access-deny (ignored) 

Re: PirateBox 0.6.3 - Chatbox problem
July 01, 2013 11:37AM
error.log is usual.. that error.
you are running on a laptop correct? can you post the output of the following commands please

grep LIGHTTPD /opt/piratebox/conf/piratebox.conf
ls -l /opt/piratebox
ls -l /opt/piratebox/www
ls -l /opt/piratebox/www/cgi-bin
ls -l /opt/piratebox/share
Yes, I am running on a laptop.

root@debian:/home/admin# grep LIGHTTPD /opt/piratebox/conf/piratebox.conf
LIGHTTPD_USER=nobody
LIGHTTPD_GROUP=nogroup

root@debian:/home/admin# ls -l /opt/piratebox
total 40
drwxr-xr-x 3 root   root    4096 Jul  1 02:47 bin
drwxr-xr-x 3 root   root    4096 Jul  1 02:48 conf
drwxr-xr-x 3 root   root    4096 Jul  1 05:55 dream
drwxr-xr-x 2 root   root    4096 Jul  1 02:47 init.d
drwxr-xr-x 2 root   root    4096 Jul  1 02:48 python_lib
drwxr-xr-x 5 nobody nogroup 4096 Jul  1 02:48 share
drwxr-xr-x 2 root   root    4096 Jul  1 02:47 src
drwxr-xr-x 2 nobody nogroup 4096 Jul  1 07:04 tmp
-rw-r--r-- 1 root   root      18 Jul  1 02:47 version
drwxr-xr-x 6 nobody nogroup 4096 Jul  1 05:58 www

root@debian:/home/admin# ls -l /opt/piratebox/www
total 196
lrwxrwxrwx 1 root   root       26 Jul  1 02:48 board -> /opt/piratebox/share/board
drwxr-xr-x 2 nobody nogroup  4096 Jul  1 02:47 cgi-bin
-rw-r--r-- 1 nobody nogroup  1720 Jul  1 07:08 chat_content.html
-rwxr-xr-x 1 nobody nogroup  1518 Jul  1 02:47 chat.html
drwxr-xr-x 3 root   root     4096 Jul  1 05:58 dreamwall
-rwxr-xr-x 1 nobody nogroup  1406 Jul  1 02:47 favicon.ico
-rw-r--r-- 1 nobody nogroup     0 Jul  1 02:48 forban_link.html
-rwxr-xr-x 1 nobody nogroup   254 Jul  1 04:07 forum.html
-rwxr-xr-x 1 nobody nogroup  9055 Jul  1 06:48 index.html
-rw-r--r-- 1 nobody nogroup 94840 Jul  1 02:47 jquery.min.js
drwxr-xr-x 3 nobody nogroup  4096 Jul  1 02:47 library
-rw-r--r-- 1 nobody nogroup    15 Jul  1 02:47 ncsi.txt
-rwxr-xr-x 1 root   root     4394 Jul  1 05:58 piratebox.html
-rwxr-xr-x 1 nobody nogroup 16453 Jul  1 02:47 piratebox-logo.png
-rwxr-xr-x 1 nobody nogroup 12637 Jul  1 02:47 piratebox-logo-small.png
-rwxr-xr-x 1 nobody nogroup   201 Jul  1 02:47 redirect.html
lrwxrwxrwx 1 root   root       27 Jul  1 02:48 Shared -> /opt/piratebox/share/Shared
-rw-r--r-- 1 nobody nogroup     0 Jul  1 02:47 station_cnt.txt
-rwxr-xr-x 1 nobody nogroup   298 Jul  1 02:47 style.css
drwxr-xr-x 3 root   root     4096 Jul  1 05:57 www

root@debian:/home/admin# ls -l /opt/piratebox/www/cgi-bin
total 16
-rwxrwxrwx 1 nobody nogroup 1220 Jul  1 07:08 data.pso
-rwxr-xr-x 1 nobody nogroup  315 Jul  1 02:47 psoread.py
-rwxr-xr-x 1 nobody nogroup  655 Jul  1 02:47 psowrte.py
-rwxr-xr-x 1 nobody nogroup  298 Jul  1 02:47 style.css

root@debian:/home/admin# ls -l /opt/piratebox/share
total 20
drwxr-xr-x 11 nobody nogroup 4096 Jul  1 03:41 board
-rwxr-xr-x  1 root   root    4318 Jul  1 02:48 index.html
drwxr-xr-x  2 nobody nogroup 4096 Jul  1 03:01 Shared
drwxr-xr-x  2 nobody nogroup 4096 Jul  1 21:36 tmp

I made an attempt to include Dreamwall's edit of Silvyn's bootstrap. After many tries, I managed to get it loaded into the right place, but I know that I left some artifacts in other places that I haven't bothered to get rid of. However, the chat box didn't work before that, nor does it work after it.
Re: PirateBox 0.6.3 - Chatbox problem
July 02, 2013 11:09AM
is the upload box working?
Re: PirateBox 0.6.3 - Chatbox problem
July 02, 2013 12:03PM
It did the last time I checked. I can check it again tonight.
Re: PirateBox 0.6.3 - Chatbox problem
July 03, 2013 05:40AM
I can confirm that upload does work.
Hex
Re: PirateBox 0.6.3 - Chatbox problem
December 31, 2017 03:01AM
If this helps anyone in the future, I had to visit on two different devices the URL location of where the chat_content.html is located:

[piratebox.lan]

there I only saw the first anonymous default message - but it seems like refreshing that page again - all my other messages appeared.

After this, the device I was using was now able to receive all of the messages as they were being transmitted.

I had to do the same steps for my mobile device. 1) Visit that URL, 2) Refresh 3) Go back to the shoutbox