Author Topic: Whos Online PHP Script for your template site  (Read 33837 times)

0 Members and 1 Guest are viewing this topic.

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Whos Online PHP Script for your template site
« Reply #75 on: March 05, 2014, 08:47:30 PM »
Got the cloud level fixed, but...

A few days ago was the first run of the cron to update the GeoLite DB. Failed. Long message but the gist is...

Warning: fopen(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/tigercon/public_html/tiggrweather.net/wo-update.php on line 390

allow_url_fopen is On in the php.ini file.

Thoughts appreciated.
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Whos Online PHP Script for your template site
« Reply #76 on: March 05, 2014, 10:23:32 PM »
It is possible that in the server's master config, they've disallowed changing that.  Run a page with phpinfo(); in it to see the full configuration.  Check the settings under the Core listing.  If the master setting is off, then you'll likely need to contact tech support to get it changed (or allow the local php.ini to change it).

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Whos Online PHP Script for your template site
« Reply #77 on: March 06, 2014, 12:08:27 AM »
Thanks for your reply, Ken.

Both Local and Master values are On.
John
W7JKG

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Whos Online PHP Script for your template site
« Reply #78 on: March 06, 2014, 01:34:14 AM »
Time to call tech support at the hoster.. with both on, that message shouldn't have happened.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Whos Online PHP Script for your template site
« Reply #79 on: March 06, 2014, 02:28:55 AM »
Will do.

One thing bothers me, though. Other scripts that rely on that setting seem to be running OK. Should they not be failing as well?

Thanks, Ken.
John
W7JKG

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: Whos Online PHP Script for your template site
« Reply #80 on: March 10, 2014, 07:17:32 PM »
Time to call tech support at the hoster.. with both on, that message shouldn't have happened.
They say that in both my copy and the server master all settings for allow_url_fopen are on. Therefore (according to them), the script is at fault.

Just passing on what they said.
John
W7JKG

Offline i_fiorentino

  • Forecaster
  • *****
  • Posts: 562
  • Davis Vantage Vue, Boltek Stormtr., Mobotix M22-IT
    • Meteopistoia.it
Re: Whos Online PHP Script for your template site
« Reply #81 on: October 01, 2014, 02:09:14 AM »
Hi guys,
actually i've this error on my site:
Fatal error: Cannot redeclare geoip_country_code_by_name() in /home/byoryrxn/public_html/whos-online/include-whos-online-geoip.php on line 379
File attached.

Any ideas?
Thanks in advance,


Alessandro

Offline i_fiorentino

  • Forecaster
  • *****
  • Posts: 562
  • Davis Vantage Vue, Boltek Stormtr., Mobotix M22-IT
    • Meteopistoia.it
Re: Whos Online PHP Script for your template site
« Reply #82 on: October 20, 2014, 10:51:05 AM »
Hi guys,
actually i've this error on my site:
Fatal error: Cannot redeclare geoip_country_code_by_name() in /home/byoryrxn/public_html/whos-online/include-whos-online-geoip.php on line 379
File attached.

Any ideas?
Thanks in advance,


Alessandro

Up!
It seems there are some guys with the same problem.....and nobody has found a solution  :-( :-(

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
Re: Whos Online PHP Script for your template site
« Reply #83 on: October 25, 2014, 08:04:58 AM »
this script will not work with PHP5.5  !!!!!
( The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead )
I hope there will by a update soon
greetings

Offline i_fiorentino

  • Forecaster
  • *****
  • Posts: 562
  • Davis Vantage Vue, Boltek Stormtr., Mobotix M22-IT
    • Meteopistoia.it
Re: Whos Online PHP Script for your template site
« Reply #84 on: October 25, 2014, 08:32:12 AM »
this script will not work with PHP5.5  !!!!!
( The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead )
I hope there will by a update soon
greetings

Ohhhhhhhhhhh, finally someone who has found the problem  =D> =D> =D>
What do you think to send an email to Mike for fixing this issue?
Best regards,


Alessandro

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: Whos Online PHP Script for your template site
« Reply #85 on: October 25, 2014, 11:17:29 AM »
Are you sure you have php 5.5?
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline i_fiorentino

  • Forecaster
  • *****
  • Posts: 562
  • Davis Vantage Vue, Boltek Stormtr., Mobotix M22-IT
    • Meteopistoia.it
Re: Whos Online PHP Script for your template site
« Reply #86 on: October 25, 2014, 11:27:54 AM »
Are you sure you have php 5.5?

I've Php 5.4 but i think the problem is in these two versions (5.4/5.5).

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: Whos Online PHP Script for your template site
« Reply #87 on: October 25, 2014, 11:41:08 AM »
I have 5.4 and it works fine. You should start over with the script if your trying to move it over from another host.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
Re: Whos Online PHP Script for your template site
« Reply #88 on: October 25, 2014, 11:58:44 AM »
yes I have
I also have some errors into my template Saratoga but that I have fix
only the problem with this script  I can not fix
so I hope someone know what to do
 for info I was run V2 from this script and after the update from my server  to PHP 5.5  I saw the error
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
so I have delete that script and download the new one Whos Online V3  but also this one have the some problem
so I hope for you that your server will not update the PHP to 5.5  if do  you will have the some problems like my
Greetings   Gert

/////////////////////////
Does PHP work?

Yes, it does. PHP Version 5.5.17

To run the WXGRAPHIC script, you need GD enabled in PHP.
Current GD status:
•GD support: yes
•GD Version: bundled (2.1.0 compatible)
•FreeType Support:  yes
•FreeType Linkage: with freetype
•T1Lib Support:  no
•GIF Read Support:  yes
•GIF Create Support:  yes
•JPEG Support:  yes
•PNG Support:  yes
•WBMP Support:  yes
•XPM Support:  yes
•XBM Support:  yes
•JIS-mapped Japanese Font Support:  no

If you don't see "Yes, it does." in large font above, then PHP is not enabled.
/////////////////////////

Are you sure you have php 5.5?

I've Php 5.4 but i think the problem is in these two versions (5.4/5.5).

Offline JupiterJoe

  • Senior Contributor
  • ****
  • Posts: 195
  • JupiterWX.com
    • Live Jupiter, FL Weather
Re: Whos Online PHP Script for your template site
« Reply #89 on: June 22, 2015, 08:25:55 PM »
Sorry to bring up such an old thread, but I couldn't find any results using the search. Has anyone figured this out? I just started getting the PHP errors related to the mysqli and pdo for the who's online script. I'm not sure how to change the script to make it work again without throwing errors up on every page.

yes I have
I also have some errors into my template Saratoga but that I have fix
only the problem with this script  I can not fix
so I hope someone know what to do
 for info I was run V2 from this script and after the update from my server  to PHP 5.5  I saw the error
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
so I have delete that script and download the new one Whos Online V3  but also this one have the some problem
so I hope for you that your server will not update the PHP to 5.5  if do  you will have the some problems like my

Are you sure you have php 5.5?

I've Php 5.4 but i think the problem is in these two versions (5.4/5.5).

Offline Stegrie

  • Senior Member
  • **
  • Posts: 97
    • Wetterstation Johanngeorgenstadt
Re: Whos Online PHP Script for your template site
« Reply #90 on: July 02, 2015, 10:35:08 AM »
My Error Problem  is:
"Cannot redeclare geoip-country-code-by-name () in/var/vhosts/wetterstation-johanngeorgenstadt.de/http docs/include-
whos-online-geoip.php on line 379"
Have PHP 5.3.1
Myself can open my Homepage, many other Users will see this Error Message why?
Stefan

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Whos Online PHP Script for your template site
« Reply #91 on: July 02, 2015, 12:10:38 PM »
That message is the result of trying to include() more than once the 'include-whos-online-geoip.php' in the page.  PHP does not allow redefinition of a function once it is defined. 
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Stegrie

  • Senior Member
  • **
  • Posts: 97
    • Wetterstation Johanngeorgenstadt
Re: Whos Online PHP Script for your template site
« Reply #92 on: July 02, 2015, 12:20:31 PM »
And what can i do for this Problem?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Whos Online PHP Script for your template site
« Reply #93 on: July 02, 2015, 12:27:50 PM »
In your Settings.php, you have
Code: [Select]
# Set timezone in PHP5/PHP4 manner
  if (!function_exists('date_default_timezone_set')) {
     putenv("TZ=" . $SITE['tz']);
     // include the who's online functions
 require ('include-whos-online-header.php');
  $whos_online_records = update_whos_online();
//     print "<!-- using putenv(\"TZ=". $SITE['tz']. "\") -->\n";
    } else {
     date_default_timezone_set($SITE['tz']);
//     print "<!-- using date_default_timezone_set(\"". $SITE['tz']. "\") -->\n";
   }

$SITE['tzname']    = date("T",time());

// include the who's online functions
require ('include-whos-online-header.php');
  $whos_online_records = update_whos_online();
if($SITE['allowThemeSwitch']) {

Change that to
Code: [Select]
# Set timezone in PHP5/PHP4 manner
  if (!function_exists('date_default_timezone_set')) {
     putenv("TZ=" . $SITE['tz']);
//     print "<!-- using putenv(\"TZ=". $SITE['tz']. "\") -->\n";
    } else {
     date_default_timezone_set($SITE['tz']);
//     print "<!-- using date_default_timezone_set(\"". $SITE['tz']. "\") -->\n";
   }

$SITE['tzname']    = date("T",time());

// include the who's online functions
require ('include-whos-online-header.php');
  $whos_online_records = update_whos_online();
if($SITE['allowThemeSwitch']) {
and that should fix the issue.

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Stegrie

  • Senior Member
  • **
  • Posts: 97
    • Wetterstation Johanngeorgenstadt
Re: Whos Online PHP Script for your template site
« Reply #94 on: July 02, 2015, 12:43:00 PM »
Thank you Ken. You're incredible (as always)
Greeting from Germany 
Stefan
« Last Edit: July 02, 2015, 12:44:52 PM by Stegrie »

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 209
Re: Whos Online PHP Script for your template site
« Reply #95 on: August 09, 2015, 05:03:54 PM »
Hi all :)

I moved my site to a new PC and I'm getting an error when trying to update the GeoLiteCity data. This was working fine on my old PC but was an older version of the script. I'm using the newest version now because the older version was not working with my PHP 5.6.12. This new version of PHP has been giving me lots of problems with deprecated code in a lot of the scripts my side uses. I'm not sure if this is related or I set something up wrong.

I'm getting the following error:
Code: [Select]
PHP Warning: fopen(GeoLiteCity.dat.gz): failed to open stream: Permission denied in C:\inetpub\weathercat\whos-online\wo-update.php on line 353
PHP Fatal error: Call to undefined function error_exit() in C:\inetpub\weathercat\whos-online\wo-update.php on line 353

This is line 353:
Code: [Select]
  $wh = fopen($file_target, 'wb') or error_exit('download_file error: cannot write to file, check server permission settings');
I think I have the path set correctly in the settings and the permission on the geo folder are set correctly.
Can anyone help me get this fixed?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Whos Online PHP Script for your template site
« Reply #96 on: August 09, 2015, 05:11:21 PM »
I think you're running IIS on a Windows platform (based on the Permission denied in C:\inetpub\weathercat\whos-online\wo-update.php in the error message).  You likely have to give permissions to IIS to open AND write the GeoLiteCity.dat.gz file (that's what the 'w' in the fopen() second argument means, the 'b' means for binary data).

I've found that IIS can be problematic running simple PHP scripts -- if you have the option, I strongly recommend you switch to a Linux/Apache host, or if you're running the server yourself on a home system, installing XAMPP (www.apachefriends.org) and use it instead of IIS .. it will save a lot of headaches in the future.  If you install XAMPP, then make sure to use the Services panel to disable "World Wide Web Publishing Service" (nee "IIS") before starting XAMPP as Apache will want to use port 80/443, which would be occupied by IIS if enabled.
« Last Edit: August 09, 2015, 05:13:25 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 209
Re: Whos Online PHP Script for your template site
« Reply #97 on: August 09, 2015, 05:37:41 PM »
Yes it's a windows server running IIS that I have at my house. I know it's harder getting scripts to work but it's what I know and use.

I had this working on my old windows server so I know it can be done, I just need to find out how to give the correct permissions but don't remember what I did last time.

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 209
Re: Whos Online PHP Script for your template site
« Reply #98 on: August 09, 2015, 07:50:30 PM »
I fixed it, I needed to set the server path in more than one spot.  #-o

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 836
  • #conligwx
    • conligwx.org
Re: Whos Online PHP Script for your template site
« Reply #99 on: August 15, 2018, 12:51:35 PM »
This is an old thread but just wondering if others are now getting issues with this script and php 7.2.8?

Started seeing issues with the following error:

Notice: Undefined index: bots in /share/htdocs/weather/whos-online/include-whos-been-online.php on line 190 which is:

Code: [Select]
  echo TEXT_SHOW_BOTS . ': <input type="checkbox" name="bots" value="show" onclick="this.form.submit()"' . ($_GET['bots'] == 'show' ? ' checked="checked"': '') . ' />';
  echo '

if I check the tick box the error goes away.,

unfortunately the script is no long supported which was written by Mike Challis.

Any help would be most appreciated
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


 

anything