Raised This Month: $12 Target: $400
 3% 

[ANY] Player Analytics


Post New Thread Reply   
 
Thread Tools Display Modes
DrFallen
AlliedModders Donor
Join Date: Jul 2013
Location: ./root
Old 03-31-2014 , 15:03   Re: [ANY] Player Analytics
Reply With Quote #101

Yeah mine seems to be an error with the index.php added your main.php to see but nope same error

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/drfallen/public_html/network/webworks/report/index.php on line 61

Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@) at position 0 (@): Unexpected character' in /home/drfallen/public_html/network/webworks/report/index.php:63 Stack trace: #0 /home/drfallen/public_html/network/webworks/report/index.php(63): DateTime->__construct('@') #1 {main} thrown in /home/drfallen/public_html/network/webworks/report/index.php on line 63

Tried adding the shortcut too but file already exists.
DrFallen is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 03-31-2014 , 19:27   Re: [ANY] Player Analytics
Reply With Quote #102

Quote:
Originally Posted by mikehawk View Post
I had this working and then uploaded Pickles package. Started getting the white screen and a log full of errors.

If you are running Pickles updated version, remove config.php from the root folder. You should already have it in the include folder. Just make sure you have your database info in include/config.php After that you have to fix main.php . It have fundamental flaws in it dealing with sending headers in php. Replace the contents of main.php with this:

PHP Code:
<?php
/**
 * Main.php
 *
 * This is an example of the main page of a website. Here
 * users will be able to login. However, like on most sites
 * the login form doesn't just have to be on the main page,
 * but re-appear on subsequent pages, depending on whether
 * the user has logged in or not.
 *
 * Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
 * Last Updated: June 15, 2011 by Ivan Novak
 */
include("include/session.php");
$page "main.php";
/**
 * User has already logged in, so display relavent links, including
 * a link to the admin center if the user is an administrator.
 */
if($session->logged_in){
    
//echo "logged in" ;
    
header('Location: index.php');
}
else{
?>

<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Player Analytics</title>
    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Add custom CSS here -->
    <link href="css/signin.css" rel="stylesheet">
</head>
<body>

<div id="main">

<div id="login">
    <div class="container">
            <?php
            
/**
             * User not logged in, display the login form.
             * If user has already tried to login, but errors were
             * found, display the total number of errors.
             * If errors occurred, they will be displayed.
             */
            
if($form->num_errors 0){
               echo 
"<div class=\"alert alert-danger\">".$form->num_errors." error(s) found</div>";
            }
            
?>
      <form class="form-signin" action="include/process.php" method="POST">
        <h2 class="form-signin-heading">Please sign in</h2>
        <?php echo $form->error("user"); ?>
        <input type="text" name="user" maxlength="30" class="form-control" placeholder="Username" value="<?php echo $form->value("user"); ?>" required autofocus>
        <?php echo $form->error("pass"); ?>
        <input type="password" name="pass" maxlength="30" class="form-control" placeholder="Password" value="<?php echo $form->value("pass"); ?>" required>
        <input type="hidden" name="sublogin" value="1">
        <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
      </form>
      <p style="text-align:center"><br/><a href="forgotpass.php">Forgot Password?</a></p>
    </div> <!-- /container -->
</div><!-- #login -->
<?php
}
?>
</div><!-- #main -->
    <script type="text/javascript">
        jQuery(function($){
            <?php
            
if(isset($_GET['hash'])){
                
$hash $_GET['hash'];
            } else {
                
$hash '';
            }
            
?>
            jp_hash = ('<?php echo $hash?>'.length)?'<?php echo $hash?>':window.location.hash;
            if(jp_hash){
                $.ajax({
                    type: "POST",
                    url: 'process.php',
                    data: 'login_with_hash=1&hash='+jp_hash,
                    success: function(msg){
                        if(msg){
                            alert(msg);
                            window.location.href = "main.php";
                        } else {
                            alert("Invalid Hash");
                        }
                    }
                });
            }
        });
    </script>
</body>
</html>
Not sure if this will fix other peoples problems but it fixed mine.
yep, config is already in include folder.. still a blank site when i go to mysite/connections/

but main.php autodirect to index.php after logging in works now.
asdfxD is offline
dotexe
Senior Member
Join Date: Aug 2013
Old 03-31-2014 , 23:37   Re: [ANY] Player Analytics
Reply With Quote #103

I really like the UI of the web panel. Hopefully someone continues working on it!
dotexe is offline
DrFallen
AlliedModders Donor
Join Date: Jul 2013
Location: ./root
Old 04-01-2014 , 14:31   Re: [ANY] Player Analytics
Reply With Quote #104

Weirdly I can access the pages by directing them by name but I still get the

mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given

I'm using Apache CPanel VPS with Mysqli enabled
DrFallen is offline
mikehawk
Member
Join Date: Feb 2011
Old 04-01-2014 , 22:13   Re: [ANY] Player Analytics
Reply With Quote #105

DrFallen, it sounds like the database is returning an empty row. If you have access to PhpMyAdmin look at player_analytics table and make sure there is some data in the connect_time field.

...and asdfxD, which version are you using I don't have a "connections" page or folder in my install.
mikehawk is offline
Pickles47
Member
Join Date: Jun 2013
Old 04-01-2014 , 23:43   Re: [ANY] Player Analytics
Reply With Quote #106

Quote:
Originally Posted by mikehawk View Post
DrFallen, it sounds like the database is returning an empty row. If you have access to PhpMyAdmin look at player_analytics table and make sure there is some data in the connect_time field.

...and asdfxD, which version are you using I don't have a "connections" page or folder in my install.
Sounds like his player_analytics table doesn't exist at all. The only way I was able to reproduce his errors in their entirety was by dropping table player_analytics.

So...

DrFallen: Either you have no player_analytics table, generated by the plugin, OR you imported the sql scripts from the panel into a separate database and are using that database info in your config. If neither is the case, I am at a lose to what the problem is.

mikehawk: I appreciate the fix, an oversight on my part.

Last edited by Pickles47; 04-02-2014 at 03:19.
Pickles47 is offline
mikehawk
Member
Join Date: Feb 2011
Old 04-02-2014 , 04:41   Re: [ANY] Player Analytics
Reply With Quote #107

No problem Pickles. I wasn't picking on your work, just pointing out some fixes I found. Great work so far! Do you have any plans on improvements?
mikehawk is offline
DrFallen
AlliedModders Donor
Join Date: Jul 2013
Location: ./root
Old 04-02-2014 , 09:03   Re: [ANY] Player Analytics
Reply With Quote #108

Thanks Guys, that got rid of the error but I now get Fatal error: Call to a member function setTimeZone() on a non-object in index.php line 63 and its also displaying rows 4 hours behind what the webserver is set to. I've replaced the default location on line 64.
DrFallen is offline
Pickles47
Member
Join Date: Jun 2013
Old 04-02-2014 , 10:05   Re: [ANY] Player Analytics
Reply With Quote #109

Quote:
Originally Posted by DrFallen View Post
Thanks Guys, that got rid of the error but I now get Fatal error: Call to a member function setTimeZone() on a non-object in index.php line 63 and its also displaying rows 4 hours behind what the webserver is set to. I've replaced the default location on line 64.
Yes, a known issue is the timezones being setup for 'America/Chicago' despite the webserver default timezone. I will upload a new version that fixes a few things and update this post. The timezone is a hold over from when it was a private panel.
Pickles47 is offline
DrFallen
AlliedModders Donor
Join Date: Jul 2013
Location: ./root
Old 04-02-2014 , 10:46   Re: [ANY] Player Analytics
Reply With Quote #110

Quote:
Originally Posted by Pickles47 View Post
Yes, a known issue is the timezones being setup for 'America/Chicago' despite the webserver default timezone. I will upload a new version that fixes a few things and update this post. The timezone is a hold over from when it was a private panel.
Thanks Pickles Looking forward to trying the update

Last edited by DrFallen; 04-02-2014 at 10:46.
DrFallen is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode