Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See the Wiki for download

php error in logs

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

php error in logs

Post by dazza1223 » Fri Jun 22, 2018 1:23 pm

[Fri Jun 22 14:17:27.659241 2018] [:error] [pid 22995] [client 107.170.228.161:49198] PHP Notice: Undefined variable: WUtitle in /home/pi/usb/website/WU-forecast.php on line 617




[Fri Jun 22 13:48:15.173761 2018] [:error] [pid 22995] [client 216.244.66.236:41462] PHP Notice: Undefined offset: 2 in /home/pi/usb/website/readDayfile.php on line 157



undefined constant chill - assumed 'chill' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/index.php



[Fri Jun 22 11:36:21.568680 2018] [core:notice] [pid 824] AH00052: child pid 10484 exit signal Bus error (7)


can any one work out what going on with this thank?
have fun and keep learning

dazza :D

User avatar
ConligWX
Posts: 726
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.5 Stretch
Location: Bangor, NI
Contact:

Re: php error in logs

Post by ConligWX » Fri Jun 22, 2018 6:25 pm

try updating to v3.05 of WU-forecast.

https://saratoga-weather.org/scripts-WU ... WUforecast

Code: Select all

// Version 3.04 - 27-Feb-2018 - fix for new format source URL
// Version 3.05 - 13-Jun-2018 - fix for partial JSON return from WU query/blank forecast
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2 Plus - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS Templates

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: php error in logs

Post by dazza1223 » Fri Jun 22, 2018 11:12 pm

hi ive just updated it and it still the same do i need to upgrade to the new php or something as it all was ruining fine ?
have fun and keep learning

dazza :D

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: php error in logs

Post by dazza1223 » Fri Jun 22, 2018 11:13 pm

p:s


i get this error on refresh off home page as well

System.ArgumentOutOfRangeException: Cannot exceed length of string. Parameter name: startIndex at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in :0 at CumulusMX.TokenParser.Parse2 () [0x00000] in :0 at CumulusMX.TokenParser.ToString () [0x00000] in :0
have fun and keep learning

dazza :D

User avatar
saratogaWX
Posts: 903
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: php error in logs

Post by saratogaWX » Sat Jun 23, 2018 1:59 am

What is the URL to your site page(s) showing the problem(s)?

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: php error in logs

Post by dazza1223 » Sat Jun 23, 2018 3:50 pm

hi here the link http://www.davisworthing.co.uk/

and ive just checked the logs to day


[Sat Jun 23 16:46:09.908273 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Use of undefined constant winddir - assumed 'winddir' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
[Sat Jun 23 16:46:09.908333 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Use of undefined constant baro - assumed 'baro' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
[Sat Jun 23 16:46:09.908389 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Use of undefined constant chill - assumed 'chill' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
[Sat Jun 23 16:46:09.908447 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Use of undefined constant rain - assumed 'rain' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
[Sat Jun 23 16:46:09.908506 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Use of undefined constant dew - assumed 'dew' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
[Sat Jun 23 16:46:09.908563 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Use of undefined constant heat - assumed 'heat' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
[Sat Jun 23 16:46:09.908629 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Use of undefined constant hum - assumed 'hum' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
[Sat Jun 23 16:46:09.912359 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Undefined variable: dew10 in /home/pi/usb/website/spark.php on line 39, referer: http://www.davisworthing.co.uk/
[Sat Jun 23 16:47:09.522461 2018] [core:notice] [pid 824] AH00052: child pid 20418 exit signal Bus error (7)
[Sat Jun 23 16:47:15.529305 2018] [core:notice] [pid 824] AH00052: child pid 26667 exit signal Bus error (7)
have fun and keep learning

dazza :D

User avatar
saratogaWX
Posts: 903
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: php error in logs

Post by saratogaWX » Sat Jun 23, 2018 4:50 pm

The sparkline script (spark.php) is not one of mine.. sorry.
However, you can easily fix those notice errata by simply doing what the error message says.

Example:

Code: Select all

[Sat Jun 23 16:46:09.908273 2018] [:error] [pid 5487] [client 92.27.85.131:51618] PHP Notice: Use of undefined constant winddir - assumed 'winddir' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
Go to line# 32 in spark.php. You will see some code that contains the word winddir .. change it to 'winddir' and that will fix the issue.

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: php error in logs

Post by dazza1223 » Sat Jun 23, 2018 6:04 pm

O great thank for that fix and I'm geting weather under ground error and a core error to is there a qick fix for that
have fun and keep learning

dazza :D

User avatar
saratogaWX
Posts: 903
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: php error in logs

Post by saratogaWX » Sat Jun 23, 2018 6:42 pm

You're running WU-forecast.php (ML) Version 3.03 - 22-Feb-2017 -- I'd suggest updating to Version 3.05 - 13-Jun-2018

The undefined Notice for WU-forecast was likely caused by an incomplete fetch from the WU API. V3.05 should handle that (no cache save if incomplete return from WU API).

As for the system error.. sorry, no idea what that might be.

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: php error in logs

Post by dazza1223 » Sat Jun 23, 2018 9:20 pm

ok ive fix the error with WU-forecast.php... but i tried what u said about spark.php and it the same
have fun and keep learning

dazza :D

User avatar
saratogaWX
Posts: 903
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: php error in logs

Post by saratogaWX » Sat Jun 23, 2018 9:32 pm

Umm... you did fix ALL the ones cited in the Notice messages, yes? That is:

baro is replaced with 'baro' in /home/pi/usb/website/spark.php on line 32
chill is replaced with 'chill' in /home/pi/usb/website/spark.php on line 32
rain is replaced with 'rain' in /home/pi/usb/website/spark.php on line 32
dew is replaced with 'dew' in /home/pi/usb/website/spark.php on line 32
heat is replaced with 'heat' in /home/pi/usb/website/spark.php on line 32
hum is replaced with 'hum' in /home/pi/usb/website/spark.php on line 32

for this one

Code: Select all

PHP Notice: Undefined variable: dew10 in /home/pi/usb/website/spark.php on line 39

You just have to remove the reference to $dew10 which is not set in the code.

I don't have visibility to the code of spark.php, so you'll just need to do what I said for each of the cited variable names.

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: php error in logs

Post by dazza1223 » Sat Jun 23, 2018 9:38 pm

ok mate well you doing good for helping me here is the spark.php code if you want to have a look
spark.rar
You do not have the required permissions to view the files attached to this post.
have fun and keep learning

dazza :D

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: php error in logs

Post by dazza1223 » Sat Jun 23, 2018 9:42 pm

ok if i do what you said the error in the php log give


[Sat Jun 23 22:41:30.000164 2018] [:error] [pid 19205] [client 92.27.85.131:63657] PHP Parse error: syntax error, unexpected ''baro'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /home/pi/usb/website/spark.php on line 32, referer: http://www.davisworthing.co.uk/
have fun and keep learning

dazza :D

User avatar
saratogaWX
Posts: 903
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: php error in logs

Post by saratogaWX » Sat Jun 23, 2018 9:47 pm

Line 32

Code: Select all

$param = array( temp, rain, wind, gust, winddir, baro, chill, rain, dew, heat, hum, ); // Add other parameters here - ensuring webtags are created first.
should be

Code: Select all

$param = array( 'temp', 'rain', 'wind', 'gust', 'winddir', 'baro', 'chill', 'rain', 'dew', 'heat', 'hum' ); // Add other parameters here - ensuring webtags are created first.

User avatar
dazza1223
Posts: 414
Joined: Sun Jan 25, 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: php error in logs

Post by dazza1223 » Sat Jun 23, 2018 9:50 pm

somthink working but to two lines now

[Sat Jun 23 22:49:14.046325 2018] [core:notice] [pid 824] AH00052: child pid 16670 exit signal Bus error (7)
[Sat Jun 23 22:49:51.437063 2018] [:error] [pid 19668] [client 92.27.85.131:64329] PHP Notice: Undefined variable: dew10 in /home/pi/usb/website/spark.php on line 39, referer: http://www.davisworthing.co.uk/
have fun and keep learning

dazza :D

Post Reply