Author Topic: A non-numeric value encountered in  (Read 908 times)

0 Members and 1 Guest are viewing this topic.

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
A non-numeric value encountered in
« on: March 13, 2020, 07:40:30 AM »
I recently switched web hosting service. Ever since then I've had these warnings on the top of my page:

Warning: A non-numeric value encountered in /home4/steviebaby59/public_html/nws-alerts.php on line 100

Warning: A non-numeric value encountered in /home4/steviebaby59/public_html/nws-alerts.php on line 921

I've had this issue before but forgot how to resolve it. I know it's a configuration in my php file.

Also, I'm getting this on my local metar display: unable to load KSTJ data RC=302 Object Moved

Can anybody out there give me some advice. :roll: www.empireprairieweather.com

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Re: A non-numeric value encountered in
« Reply #1 on: March 13, 2020, 05:53:18 PM »
Can anybody help me with this? Everyone else is getting replies but not me. I've emailed Ken but he hasn't replied either. :sad:

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: A non-numeric value encountered in
« Reply #2 on: March 13, 2020, 06:01:13 PM »
This might not be getting noticed since these questions are usually handled under "Weather Website PHP/AJAX scripting". Might want to re-post there.

The first thing I see when I load your site is:

Code: [Select]
Warning: include_once(nws-alerts.php): failed to open stream: No such file or directory in /home4/steviebaby59/public_html/header.php on line 41

Warning: include_once(): Failed opening 'nws-alerts.php' for inclusion (include_path='.:/opt/php71/lib/php') in /home4/steviebaby59/public_html/header.php on line 41

For that, it looks like that file isn't there or where it's supposed to be.

Anyway, I'll have a look to see if I can figure out anything.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline CamarilloWX

  • CamarilloWX
  • Senior Contributor
  • ****
  • Posts: 184
    • Camarillo Weather
Re: A non-numeric value encountered in
« Reply #3 on: March 13, 2020, 06:15:43 PM »
Can anybody help me with this? Everyone else is getting replies but not me. I've emailed Ken but he hasn't replied either. :sad:
Your scripts are out of date.  I would start by updating them and see if the problem clears.

http://www.empireprairieweather.com/check-fetch-times.php?show=versions

Sent from my SM-G960U using Tapatalk

Eric

Offline CamarilloWX

  • CamarilloWX
  • Senior Contributor
  • ****
  • Posts: 184
    • Camarillo Weather
Re: A non-numeric value encountered in
« Reply #4 on: March 13, 2020, 06:29:59 PM »
nws-alerts.php is also missing as pointed out by Jasiu.  The update tool page includes it if you select 15-July-2016 as suggested.

Sent from my SM-G960U using Tapatalk
Eric

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Re: A non-numeric value encountered in
« Reply #5 on: March 13, 2020, 09:29:14 PM »
I deleted the nws-alert php file because now when it's up loaded all I get it this:

Warning: A non-numeric value encountered in /home4/steviebaby59/public_html/nws-alerts.php on line 100

Warning: A non-numeric value encountered in /home4/steviebaby59/public_html/nws-alerts.php on line 134

Warning: Illegal string offset 'Andrew County' in /home4/steviebaby59/public_html/nws-alerts.php on line 177

Warning: Illegal string offset 'DeKalb County' in /home4/steviebaby59/public_html/nws-alerts.php on line 177

Warning: Illegal string offset 'MOZ002' in /home4/steviebaby59/public_html/nws-alerts.php on line 223

Fatal error: Uncaught Error: Cannot use string offset as an array in /home4/steviebaby59/public_html/nws-alerts.php:223 Stack trace: #0 /home4/steviebaby59/public_html/header.php(41): include_once() #1 /home4/steviebaby59/public_html/index.php(44): include('/home4/stevieba...') #2 {main} thrown in /home4/steviebaby59/public_html/nws-alerts.php on line 223

Offline CamarilloWX

  • CamarilloWX
  • Senior Contributor
  • ****
  • Posts: 184
    • Camarillo Weather
Re: A non-numeric value encountered in
« Reply #6 on: March 13, 2020, 09:58:40 PM »
Are you going to update your scripts?

Sent from my SM-G960U using Tapatalk

Eric

Offline steviebaby59

  • Contributor
  • ***
  • Posts: 109
    • Empire Prairie Weather
Re: A non-numeric value encountered in
« Reply #7 on: March 14, 2020, 06:41:37 AM »
Found the updated script. Thanks for the help. =D>

 

anything