cloudy

Author Topic: Who's Online PHP Script 2.0 for your template site  (Read 110226 times)

0 Members and 1 Guest are viewing this topic.

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Who's Online PHP Script 2.0 for your template site
« Reply #780 on: April 22, 2010, 03:31:31 PM »
I worked on version 3.0 tonight. It is almost ready. Maybe I will have a beta in a few days.

I got busy and did not finish the who 3.0
I was really close. I made enough changes that I can't just release it as is or I will get a flood of post about bugs, then I would have to start fixing things in a hurry. Not sure when I will find the time.

I have a WordPress version of the 3.0 that is bug free with a 5 star rating and 85,132 downloads.
http://wordpress.org/extend/plugins/profile/mikechallis

I have 3 popular Wordpress plugins with more than 500,000 downloads.  :lol: 8) :lol:  8O
« Last Edit: April 22, 2010, 03:34:00 PM by MCHALLIS »

Offline dengland

  • Posts: 31
  • Rockledge, FL
    • Rockledge Weather
Re: Who's Online PHP Script 2.0 for your template site
« Reply #781 on: April 22, 2010, 10:11:30 PM »
Sorry... I have to ask...  Why did you decide to post today?

(Happy user of 2.0 who's online)

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Who's Online PHP Script 2.0 for your template site
« Reply #782 on: April 23, 2010, 05:23:23 PM »
somebody private messaged me the question so i thought I would answer it for all

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 4,635
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Who's Online PHP Script 2.0 for your template site
« Reply #783 on: May 24, 2010, 05:32:18 PM »
I've just started using this script and I've run into a wee problem.
I can't get the worldmap to show on the page, or on it's own for that matter, neither will the ip addresses or flags show in the script.

What I've done so far:
Changed the settings and uploaded all the required files for the main Who's Online page to work.
The GeoLiteCity.dat has downloaded ok using wo-update.php and showed my IP address once finished. It's also set to chmod 0644 on the server and is in the root directory.
All the other required files have been uploaded to the root directory and the settings change in the include-whos-online-settings.php file.
All the database tables were set up using phpMyAdmin and they are working fine.

When I go to my who's online page (http://www.hebwx.co.uk/whos-online.php) I get "Host: (n/a) n/a" and the "get_whos_online_worldmap error: whos online location_plugin not enabled or installed" warning. This says to me that something is missing or not set correctly.

I've seen in the readme that it says "NOTE: This script requires a mysql database to hold the ip-to-country lookup database." under the Requirements. Could this be the problem and if so, how can I get hold of the database to add to mysql or where should I be looking for it to see if it's there already?

One thing I wasn't sure about with the location plugin is whether there are any more files that I need, other then the one's that come with the Who's Online zip file and GeoLiteCity.dat?

Just for reference, I'm using the latest download of the script, v2.25 and my PHP version is 5.2.0-8+etch16.

Cheers for any help.

Martin.

Offline dengland

  • Posts: 31
  • Rockledge, FL
    • Rockledge Weather
Re: Who's Online PHP Script 2.0 for your template site
« Reply #784 on: May 25, 2010, 01:14:05 AM »
Do you have these set right in include-whos-online-settings.php?

Code: [Select]
// open whois_url on a pop up?
$C['whois_url_popup'] = 1; // 1 enables, 0 disables

// enable host lookups for IP addresses
// (this will add an ISP hostname to the IP address link title and to the profile display)
// hostname lookups may sometimes cause a delay in web page loading, if that becomes the case, you can disable it
$C['enable_host_lookups'] = 1; // 1 enables, 0 disables

// enable location-plugin (shows country flags for visitors and stores location info)
// requires installing the location-plugin
// enabling this will cause an error if you have not installed the plugin!
$C['enable_location_plugin'] = 1; // 1 enables, 0 disables

// enable display of city, state next to country flag
// requires installing and enabling the location-plugin
$C['enable_state_display'] = 1; // 1 enables, 0 disables

Can you confirm that you have performed step #2 of the "readme-location-plugin.txt"? (You should be fine if you did all of step #5 from the main install readme).

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 4,635
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Who's Online PHP Script 2.0 for your template site
« Reply #785 on: May 25, 2010, 07:36:07 AM »
Yep, all files and images in Step 2 are in the root of the website (although the instructions wo-update.php  listed twice  :wink: ).
All the other steps were followed to the letter. That why I think it's something else, maybe the ip-to-county lookup database thingy.

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Who's Online PHP Script 2.0 for your template site
« Reply #786 on: May 28, 2010, 12:01:25 AM »
Martin,

A couple things can cause that error based on the code:

Code: [Select]
       // make sure the location plugin is installed
       if ( !file_exists($C['files_path'].'include-whos-online-geoip.php') ) {
             // not going to work
             $C['enable_location_plugin'] = 0;
       }
       if ( !isset($C['geolite_path']) ) { // allow optional custom setting of geolite path
          $C['geolite_path'] = $C['files_path'];
       }
       if ( !file_exists($C['geolite_path'].'GeoLiteCity.dat') ) {
             // give up, this way the whole site does not error
             $C['enable_location_plugin'] = 0;
       }

include-whos-online-geoip.php could be missing
GeoLiteCity.dat could be missing
or the $C['files_path'] or $C['geolite_path'] are set wrong.

Offline Budgie

  • Martin
  • Global Moderator
  • Posts: 4,635
  • WML Station: WD00934 CWOP: CW7959
  • Isle of Lewis, Scotland
    • Hebrides-Weather
Re: Who's Online PHP Script 2.0 for your template site
« Reply #787 on: May 28, 2010, 10:10:07 AM »
Hi Mike,

I got it sorted.
Although I'd changed
Code: [Select]
$C['enable_location_plugin'] = 0;
to
Code: [Select]
$C['enable_location_plugin'] = 1;for some reason it hadn't taken in the file on the server, I know I uploaded the change file!!

Still, all sorted and working nicely.

Thanks for the info & the script.  :thumbright:

Offline Forever

  • Posts: 296
  • Santa Cruz, CA
    • WeatherCat
Re: Who's Online PHP Script 2.0 for your template site
« Reply #788 on: July 04, 2010, 02:56:23 PM »
I have been using this for some time now and most of it seems to work but I can't get the login to work no matter what I do. When I try to log in with my password the page will refresh and not log me in.

What am I missing? It's no fun changing the setting in the file everytime I want to see some info.  :?

http://www.weathercat.net/wxstatus.php

Offline ThorntonWeather

  • Tony
  • Commercial
  • Posts: 459
  • Thornton, CO USA
    • ThorntonWeather.com
Re: Who's Online PHP Script 2.0 for your template site
« Reply #789 on: July 07, 2010, 08:55:32 PM »
I am having a bit of a weird problem with the Who's Online script.  See the attached screenshot for reference.

The screenshot was taken at about 3:30pm MDT.  As you can see, it indicates the max visitors for today was at 9:07pm - around six hours into the future.  Somehow I don't expect it can predict like that.  Haha! 

Anyway, it appears from watching it that everything is fine until noon or so and then it gets kind of screwy.  I have verified that the server time is correct.

Not sure what the deal is.  Any help would be greatly appreciated.

    T

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Who's Online PHP Script 2.0 for your template site
« Reply #790 on: July 26, 2010, 06:11:57 PM »
Suggested fix: MySQL performance fix for users running Whos Online

The problem:
If the database grows large(10,000 rows), some of the queries can take 100's of seconds on a shared server.

The fix for users running this program, add this index:

Code: [Select]
alter table whos_online add index nickname_time_last_click
(`nickname`, `time_last_click`);

This changed one query from processing 10,300 rows to 4 rows in one users example.

The download file has been patched.

Offline Andretti

  • Posts: 270
  • Poland, silesia, Zabrze
    • ASM Poland - Zabrze
Re: Who's Online PHP Script 2.0 for your template site
« Reply #791 on: September 10, 2010, 05:17:57 PM »
Hi Mike
I use your script for a long time. However, the recently updated database GeoLite caused an error.
Annex screen what I saw at the end of the update database.
Exactly the same problem occur when i update the database GeoLite for wxblog (based on Wordpress)
Did you find a moment of time to help me fix it?

thanks
Andretti

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Who's Online PHP Script 2.0 for your template site
« Reply #792 on: September 10, 2010, 06:00:59 PM »
Your web server might not have enough memory allocated to PHP or the file is corrupted.

If you have access to your PHP.ini file, change the line in PHP.ini
If your line shows 32M or less, try increasing it:
memory_limit = 64M;

If you don't have access to PHP.ini try adding this to an .htaccess file:
php_value memory_limit 64M

The geolite database is really just a 30 meg file. As a workaround,
you can manually download the GeoLiteCity.dat.gz file from this URL,
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
 unzip it and upload GeoLiteCity.dat to the /whos-online/
folder. The GeoLiteCity.dat file is the database for the location from
IP feature.

Offline Andretti

  • Posts: 270
  • Poland, silesia, Zabrze
    • ASM Poland - Zabrze
Re: Who's Online PHP Script 2.0 for your template site
« Reply #793 on: September 10, 2010, 06:49:34 PM »
Mike, thank you very much for the tips.
I write php_value memory_limit 64M  to .htaccess file
I think that it helped.
A GeoLiteCity.dat files on the server were identical in size to those manually download.
Both "Who's Online" now work correctly.
Great thanks for this excellent script and for help ;)


andretti

Offline _Niklas_

  • Posts: 42
  • Sweden, Europe
    • My Weather Site
Re: Who's Online PHP Script 2.0 for your template site
« Reply #794 on: October 14, 2010, 05:02:48 PM »
Im getting a : Fatal error: error traversing database - perhaps it is corrupt? in C:\wdisplay\webfiles\carterlake\include-whos-online-geoip.php on line 454

when trying to view my weather page from my Local Area Network (im running my own webserver), like on a http://192.168.x.x/whos-online.php address...

However, if I run it on my weather computer, and change the ip address to localhost (http://localhost/whos-online.php) and when accessing my page from the "outside" it works.

Anyone got any ideas about this?  :?

Niklas

 

cumulus