Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Print Who is Online for a new Board? (Read 3171 times)
SegaNino
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 10
Location: Berlin
Joined: Dec 28th, 2003
Print Who is Online for a new Board?
Jan 17th, 2019 at 5:23pm
Print Post  
On my old Board SP1.3 was a mod, so i could see who is online and the last recent on the first page of my webside

http://www.sega-oldies.de


With SSI it worked easy...

Code (HTML)
Select All
<!--#include virtual="/cgi-bin/yabb/YaBB.pl?action=print_whoisonline" -->

<!--#include virtual="/cgi-bin/yabb/YaBB.pl?action=recenttopics" --> 



A few years ago I switched to YaBB 2.5.2
It does't work.
Can me tell somebody, how I can get this?
  

ssYaBB252News.jpg ( 128 KB | 115 Downloads )
ssYaBB252News.jpg
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I Love YaBB 2!

Posts: 137
Joined: Apr 25th, 2012
Re: Print Who is Online for a new Board?
Reply #1 - Jan 19th, 2019 at 1:07pm
Print Post  
  
Back to top
WWW  
IP Logged
 
SegaNino
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 10
Location: Berlin
Joined: Dec 28th, 2003
Re: Print Who is Online for a new Board?
Reply #2 - Jan 21st, 2019 at 4:36pm
Print Post  
Oh yes, that is exactly what I looking for. Many thanks Smiley

But the the result is the same. It dosn't work.  Smiley

It is installed. Can I try something other?
  
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I Love YaBB 2!

Posts: 137
Joined: Apr 25th, 2012
Re: Print Who is Online for a new Board?
Reply #3 - Jan 21st, 2019 at 6:00pm
Print Post  
Did you change the file permissions to 755 or 777?
Did you upload them to the correct place (inside yabb2)?
Did you fix the virtual include line to the new file names?
Do you have access to the server error log and if so, what does it say?
  
Back to top
WWW  
IP Logged
 
SegaNino
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 10
Location: Berlin
Joined: Dec 28th, 2003
Re: Print Who is Online for a new Board?
Reply #4 - Jan 21st, 2019 at 7:59pm
Print Post  
Permission 755? Yes. I hav tryed 777 now too, but nothing.
Correct place? Yes.
Correct line? Yes.
Error log? I'm searching... The menu has changed between. The last time I see this is seven years ago... I post it then.
  
Back to top
WWW  
IP Logged
 
SegaNino
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 10
Location: Berlin
Joined: Dec 28th, 2003
Re: Print Who is Online for a new Board?
Reply #5 - Jan 21st, 2019 at 11:48pm
Print Post  
I have mailed with the server-support.
I have a PHP-Error-log, but its empty.

The support said, to use cgi/perl-scripts i have to do so:

<!--#exec cgi="/cgi-bin/yabb2/usersonlineSSI.pl"-->

I have done, but it isn't work.
But it shows no error. The place is empty now.

When I go to the script directly, comes an error too.
Is this correct so???
http://www.sega-oldies.de/cgi-bin/yabb2/usersonlineSSI.pl


The Script from the chat is work whitout problems. Why?
http://www.sega-oldies.de/cgi-bin/gtchat/gtchatusers.pl

Thanks and what now?  Roll Eyes
  
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I Love YaBB 2!

Posts: 137
Joined: Apr 25th, 2012
Re: Print Who is Online for a new Board?
Reply #6 - Jan 22nd, 2019 at 1:21am
Print Post  
No, it should not be throwing a 500 error.
Any errors regarding Perl files should be found in the server error log.

If you don't have access to those or your host won't give them to you, then I just have to guess they've turned off or removed something essential OR one or more of the files the script needs (like Settings.pl) has a different name or is not where it belongs.




  
Back to top
WWW  
IP Logged
 
SegaNino
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 10
Location: Berlin
Joined: Dec 28th, 2003
Re: Print Who is Online for a new Board?
Reply #7 - Jan 25th, 2019 at 5:54pm
Print Post  
I have asked now again for ther server error log. Now I have to wait, for the answer.

The required files.. (for usersonlineSSI.pl)
  Variables/Settings.pl
  Variables/log.txt
  Variables/bots.hosts
are on the place.

CHMOD for  Variables/Settings.pl  is 644? Is this correct?
  
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I Love YaBB 2!

Posts: 137
Joined: Apr 25th, 2012
Re: Print Who is Online for a new Board?
Reply #8 - Jan 25th, 2019 at 7:06pm
Print Post  
Quote:
CHMOD for  Variables/Settings.pl  is 644? Is this correct?

Yes - Variables/Settings.pl is NOT an executable file.
  
Back to top
WWW  
IP Logged
 
SegaNino
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 10
Location: Berlin
Joined: Dec 28th, 2003
Re: Print Who is Online for a new Board?
Reply #9 - Jan 26th, 2019 at 11:22am
Print Post  
I have the answer from the server-support:

Quote:
Der Server-Logfile können Sie leider nicht einsehen, wir konnten nachfolgenden Eintrag auffinden.

[2019-01-26 10:15:19]: (2)No such file or directory: exec failed (usersonlineSSI.pl)
[2019-01-26 10:46:04]: (2)No such file or directory: exec failed (usersonlineSSI.pl)


Thats all. What can I do now?
  
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I Love YaBB 2!

Posts: 137
Joined: Apr 25th, 2012
Re: Print Who is Online for a new Board?
Reply #10 - Jan 26th, 2019 at 2:05pm
Print Post  
The error says that the file usersonlineSSI.pl is either not on the server or not where you think it is on the server.

The request in the *.shtml file must point to where usersonlineSSI.pl actually is. (And I have no way of knowing where that actually is.)
  
Back to top
WWW  
IP Logged
 
SegaNino
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 10
Location: Berlin
Joined: Dec 28th, 2003
Re: Print Who is Online for a new Board?
Reply #11 - Jan 28th, 2019 at 1:04pm
Print Post  
Everything is on the right place.

Here ist the script.
http://www.sega-oldies.de/cgi-bin/yabb2/usersonlineSSI.pl

this is the line from the shtml
<!--#exec cgi="/cgi-bin/yabb2/usersonlineSSI.pl" -->

The server support show me the faqs...
Quote:
Beachten Sie, dass nicht alle Shellskripte bzw. Shellbefehle über das Skript ausgeführt werden können, da einige Befehle aus Sicherheitsgründen gesperrt sind.

Es ist möglich, dass größere Skripte abbrechen, da diese ggf. an Serverrestriktionen stoßen.

Legen Sie eine Datei mit einem beliebigen Namen an, z.b. cgi-bruecke.php.

Diese hat folgenden Inhalt:

<?php
exec("/bin/bash Pfad zum Script  2>&1", $out, $result);
echo "Returncode: " .$result ."<br>";
echo "Ausgabe des Scripts: " ."<br>";
echo "<pre>"; print_r($out);
?>

Der Aufruf erfolgt dann über Ihre Domain:

http://www.IhreDomain.de/cgi-bruecke.php

Das Skript kann auch für Perl
exec("/usr/bin/perl Pfad zum Script  2>&1", $out, $result);

Python
exec("/usr/bin/python Pfad zum Script  2>&1", $out, $result);

PHP
exec("/usr/bin/php Pfad zum Script 2>&1", $out, $result);

verwendet werden.

Soweit in Ihrem Tarif enthalten, können Sie dieses Skript auch als Cronjob einrichten.


Is this importent for this? I don't know.

For example the Chat-Script works!

here ist the script:
http://www.sega-oldies.de/cgi-bin/gtchat/gtchatusers.pl

the line from the shtml
<!--#exec cgi="/cgi-bin/gtchat/gtchatusers.pl"-->

the script-code:
Code (Perl)
Select All
#!/usr/bin/perl

#########################################################
#              GT-ChatUsers 0.93 v1.04                  #
#########################################################

#-> Copyright 2001 by Dominik Leibenger <-#


# Variablen anpassen! / Set up the variables!

# Text der Userliste / Text before the userlist
$starttext = "";

# Text nach der Userliste / Text after the userlist
$endtext = "";

# Text vor einem Raumnamen / Text before a room name
$roomtitlestart = "<u><b>";

# Text vor dem ersten Raum (falls 0 dann Standardname) /
# Text before the first rooms name (if 0 then the standard name)
$roomtitlefirstroomstart = 0;

# Text nach einem Raumnamen / Text after a room name
$roomtitleend = "</b></u><br>";

# Text vor einem Usernamen / Text before a username
$usernamestart = "";

# Text nach einem Usernamen / Text after a username
$usernameend = "";

# Text zwischen 2 Usernamen / Text between two usernames
$betweenusers = ", ";

# Private Räume anzeigen / Show private rooms
$privaterooms = 0;

### Wenn privaterooms = 1 / If privaterooms = 1 ###

# Private Räume werden gekennzeichnet / Private rooms will be tagged
$showprivatetag = 0;

#########################################################

require "Settings.dat";
require "Directories.dat";
require "$sourcedir/Subs.pl";
require "$language.lng";

$nousers = "$text{login_nouseronline}";

if(($roomtitlefirstroomstart eq "0") || ($roomtitlefirstroomstart == 0))
{
  $roomtitlefirstroomstart = $roomtitlestart;
}

print "Content-Type: text/html\n\n";
print "$starttext";

my %roomlist;

opendir(DIR,$vardir);

for (readdir(DIR))
{
  if (/^online\._/)
  {
    open(FILE,"$vardir/$_");
    readlock(FILE);
    my ($name,$id,$nick,$room,$pull) = split(/\|/,<FILE>);
    unlock(FILE);
    close(FILE);

    $roomlist{$room} .= " $nick";
  }
}

closedir(DIR);

$roomnumber = 0;
$countusers = 0;

foreach my $room (sort keys %roomlist)
{
  my %chatroominfo;
  if($showprivatetag)
  {
    %chatroominfo = getRoomInfo($room);
  }
  if(!$privaterooms)
  {
    if(!$showprivatetag)
    {
      %chatroominfo = getRoomInfo($room);
    }
    if($chatroominfo{'closed'})
    {
      next;
    }
  }

  ++$roomnumber;

  if($chatroominfo{'closed'})
  {
    if($roomnumber == 1)
    {
      print "$roomtitlefirstroomstart$room ($text{roomlist_state_private})$roomtitleend";
    }
     else
    {
      print "$roomtitlestart$room ($text{roomlist_state_private})$roomtitleend";
    }
  }
   else
  {
    if($roomnumber == 1)
    {
      print "$roomtitlefirstroomstart$room$roomtitleend";
    }
     else
    {
      print "$roomtitlestart$room$roomtitleend";
    }
  }

  $firstuser = 0;

  foreach $chatuser (sort split(/ /,$roomlist{$room}))
  {
    if($chatuser ne "")
    {
      ++$countusers;
      if($firstuser == 0)
      {
        print "$usernamestart$chatuser$usernameend";
        $firstuser = 1;
      }
       else
      {
        print "$betweenusers$usernamestart$chatuser$usernameend";
      }
    }
  }
}

if ($countusers <= 0)
{
  print "$nousers";
}

print "$endtext";

exit;
 



Why this works?
  
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I Love YaBB 2!

Posts: 137
Joined: Apr 25th, 2012
Re: Print Who is Online for a new Board?
Reply #12 - Jan 28th, 2019 at 2:19pm
Print Post  
At the top of the usersonlineSSI.pl script comment out
Code (Perl)
Select All
use strict;
use warnings; 


(Put a '#' in front to both lines.)
  
Back to top
WWW  
IP Logged
 
SegaNino
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 10
Location: Berlin
Joined: Dec 28th, 2003
Re: Print Who is Online for a new Board?
Reply #13 - Jan 28th, 2019 at 11:02pm
Print Post  
nothing happens

but I have a new answer from server-support:

Quote:
die usersonlineSSI.pl ist jetzt aufrufbar. Ich habe diese soeben einmal neu gespeichert. Vermutlich waren vorher Windows Zeilenumbrüche enthalten, die den 500er Fehler ausgelöst haben.


I don't know what is different now, but this one works.

http://www.sega-oldies.de/cgi-bin/yabb2/usersonlineSSI.pl

A special options by save?

I use UltraEdit32 to edit the scripts.

But the yabbrecentSSI.pl don't need to edit. So the original dosn't work also. Where is the error?

The serversupport can explain me that so I hope...
  
Back to top
WWW  
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I Love YaBB 2!

Posts: 137
Joined: Apr 25th, 2012
Re: Print Who is Online for a new Board?
Reply #14 - Jan 29th, 2019 at 12:51am
Print Post  
Convert all line breaks to Unix/Linux style line breaks. (In Notepad++ it's under Edit->EOL conversions)
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint