Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

php error in logs

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

Moderator: daj

User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

php error in logs

Post by dazza1223 »

[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

https://www.davisworthing.co.uk

Image
User avatar
ConligWX
Posts: 1570
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: php error in logs

Post by ConligWX »

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 - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: php error in logs

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: php error in logs

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 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 »

What is the URL to your site page(s) showing the problem(s)?
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: php error in logs

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 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 »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: php error in logs

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 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 »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: php error in logs

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 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 »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: php error in logs

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: php error in logs

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 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 »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

Re: php error in logs

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
Post Reply