Author Topic: ULX log viewer  (Read 17701 times)

0 Members and 1 Guest are viewing this topic.

Offline trurascalz

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: ULX log viewer
« Reply #15 on: June 16, 2014, 04:40:51 AM »
I'll take a look at it tonight,  however I never had a restricted server to test it with.  Try adding
error_reporting(E_ALL);
  ini_set("display_errors", 1);

To the top of index. Php inside the php tag an load the page again and post error here

Offline Doctor Internet

  • Newbie
  • *
  • Posts: 6
  • Karma: 3
Re: ULX log viewer
« Reply #16 on: June 22, 2014, 12:17:58 AM »
I've done what you suggested, and came out with this error.

Quote
Successfully accessed log folder. Warning: ftp_nlist(): bind() failed: Permission denied (13) in /hermes/bosoraweb014/b177/ipg.projectbaseorg/doctor/Logging/index.php on line 73

Any ideas?


Offline Doctor Internet

  • Newbie
  • *
  • Posts: 6
  • Karma: 3
Re: ULX log viewer
« Reply #18 on: June 22, 2014, 03:35:57 AM »
Ah, thank you very much. Added the ftp_pasv($ftp_connection, true); part to the php, and it works fine.
Great addon, using it now to help administrate my server.

Offline hubbabubbagum

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: ULX log viewer
« Reply #19 on: January 07, 2015, 10:27:34 PM »
I have tried multiple paths to get this to work, but my efforts have been fruitless.

I keep getting
Code: [Select]
Parse error: syntax error, unexpected '$path' (T_VARIABLE) in /usr/www/ccaot/public/ULXLogviewer-master/config.php on line 10
My log folder is located in "public/serverlogs" and my host is NFOservers

My config looks like:
Code: [Select]
<?php

// Here you set your FTP information
$host "hosted29.nfoservers.com";
$user "*******";
$password "******";
$port "27015"// Default 21, some hosts have different
$passiveftp "0" // 1 = Yes , 0 = No, Default 0. Try enabling this if it fails to show directory
// Log Directory
$path "/public/serverlogs/";

// Other
$community "Server Logs";
?>

What am I doing wrong? Any help would be appreciated.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 547
  • Karma: 79
    • Alex Thomassen - Home
Re: ULX log viewer
« Reply #20 on: January 08, 2015, 04:30:56 AM »
I have tried multiple paths to get this to work, but my efforts have been fruitless.

I keep getting
Code: [Select]
Parse error: syntax error, unexpected '$path' (T_VARIABLE) in /usr/www/ccaot/public/ULXLogviewer-master/config.php on line 10
My log folder is located in "public/serverlogs" and my host is NFOservers

My config looks like:
Code: [Select]
<?php

// Here you set your FTP information
$host "hosted29.nfoservers.com";
$user "*******";
$password "******";
$port "27015"// Default 21, some hosts have different
$passiveftp "0" // 1 = Yes , 0 = No, Default 0. Try enabling this if it fails to show directory
// Log Directory
$path "/public/serverlogs/";

// Other
$community "Server Logs";
?>

What am I doing wrong? Any help would be appreciated.

You're missing a semicolon after:
Code: [Select]
$passiveftp = "0"
It should look like this:
Code: [Select]
$passiveftp = "0"; // 1 = Yes , 0 = No, Default 0. Try enabling this if it fails to show directory
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline hubbabubbagum

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: ULX log viewer
« Reply #21 on: January 08, 2015, 08:40:05 AM »
You're missing a semicolon after:
Code: [Select]
$passiveftp = "0"
It should look like this:
Code: [Select]
$passiveftp = "0"; // 1 = Yes , 0 = No, Default 0. Try enabling this if it fails to show directory

Oh god, I feel quite stupid now. Thank you for catching that. I must've deleted that by accident.

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 775
  • Karma: 50
Re: ULX log viewer
« Reply #22 on: June 09, 2016, 07:19:36 PM »
Sorry for this being very old, but I've tried to fix this myself a bunch of times but I just can't.

Code: [Select]
<?php

// Here you set your FTP information
$host "****";
$user "****";
$password "****";
$port "21"// Default 21, some hosts have different
$passiveftp "1"// 1 = Yes , 0 = No, Default 0. Try enabling this if it fails to show directory
// Log Directory
$path '72.5.102.25_27015/garrysmod/data/';

// Other
$community "Iodine Gaming";
?>

Every time I load up the logs.iodinegaming.com I get:
Code: [Select]
Warning: ftp_chdir(): The system cannot find the path specified. in /usr/www/iodinegaming/logs/index.php on line 68
Couldn't access log folder

I've tried:

Changing $host (and $password respectively)
Chaning $port
Changing $passiveftp
Chaning $path first param (IP)

and nothing has worked. I really want to get this working, and again sorry for this being really old.


Also, I'd like to point out that my gameserver and webserver are on two different FTPs, if that affects anything.
« Last Edit: June 09, 2016, 07:28:54 PM by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Discord

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 723
  • Karma: 114
  • :)
    • My Homepage
Re: ULX log viewer
« Reply #23 on: June 10, 2016, 12:09:15 PM »
-snip-
Code: PHP
  1. $path = '72.5.102.25_27015/garrysmod/data/';
-snip-
I don't know if NFO has changed how things work, so I'll ask.

When you connect to your gameserver's FTP in your FTP client, what directory are you in by default? What do you see before clicking on anything?
bw81@ulysses-forums ~ % whoami
Homepage

Offline trurascalz

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: ULX log viewer
« Reply #24 on: June 10, 2016, 12:30:13 PM »
Like I said in one of the replies,  try going through each folder individually first try it with 72.

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 775
  • Karma: 50
Re: ULX log viewer
« Reply #25 on: June 10, 2016, 12:40:36 PM »
I don't know if NFO has changed how things work, so I'll ask.

When you connect to your gameserver's FTP in your FTP client, what directory are you in by default? What do you see before clicking on anything?

Just /.

The folders/files I see are: bin, garrysmod, hl2mp, sourceengine, exec_iodinegaming.exe, steam_appid.txt

 
Like I said in one of the replies,  try going through each folder individually first try it with 72.

I've tried this.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Discord

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline trurascalz

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: ULX log viewer
« Reply #26 on: June 10, 2016, 12:41:53 PM »
Navigate to the folder you want in the ftp, then copy the path that the ftp software gives you,  that should be the one you need.

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 775
  • Karma: 50
Re: ULX log viewer
« Reply #27 on: June 10, 2016, 12:42:23 PM »
Navigate to the folder you want in the ftp, then copy the path that the ftp software gives you,  that should be the one you need.

I have also tried that too, and it didn't work.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Discord

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 775
  • Karma: 50
Re: ULX log viewer
« Reply #28 on: June 10, 2016, 12:45:08 PM »
I fixed it, I was being stupid. I have the $host thing filled in then I was putting the $host inside the $path... so it was connecting with ftp://usernameusername:password@host

All good now.


Except: I have another question; how can I make it so that it requires a password to get into the actual log viewer?
« Last Edit: June 10, 2016, 12:47:30 PM by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Discord

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 723
  • Karma: 114
  • :)
    • My Homepage
Re: ULX log viewer
« Reply #29 on: June 10, 2016, 01:39:31 PM »
Except: I have another question; how can I make it so that it requires a password to get into the actual log viewer?
Let me whip a (basic, super insecure) system for that real quick. I'll edit this post when it's done.

edit: Here ya go. This is untested, but should work (at a glance).

Add the following to the start of index.php (on a line after the opening <?php tag):
Code: PHP
  1. if (!isset($_SERVER['PHP_AUTH_USER'])) {
  2.     header('WWW-Authenticate: Basic realm="' . $community . '"');
  3.     header('HTTP/1.0 401 Unauthorized');
  4.     die("No login provided.");
  5. } else {
  6.     if ($_SERVER['PHP_AUTH_USER'] != $authUser || $_SERVER['PHP_AUTH_PW'] != $authPassword) {
  7.         header('HTTP/1.0 401 Unauthorized');
  8.         die("Incorrect login.");
  9.     }
  10. }

Add this to config.php, on a line before the closing ?> tag:
Code: PHP
  1. $authUser = "<your desired username>";
  2. $authPassword = "<your desired password>";
« Last Edit: June 10, 2016, 01:46:20 PM by Bytewave »
bw81@ulysses-forums ~ % whoami
Homepage