. . . shortened . . .
I know it's not necessary to have it running but I wanted to test it anyway, the use of mysql.
Indeed absolutely unnecessary. SQL will be removed in the upcoming release.
Currently there is no "database" only 1 table, to strore this-days values
The SQL-table is not used in any script. , Only at the end of the day the max and min values are retieved and stored in .csv files.
I've setup my database properly and it's accepting data successfully.
THe problem however is that two of the three cronjobs is failing.
I've setup the cronjobs properly (user 'php' is executing the scripts) and the 10 min script (w34_cron_stationcron.php) is putting realtime measurements succesfully in ./chartsmysql/result.csv.
However the two other scripts (w34_cron_empty.php and w34_cron_addtoyear.php) are not working.
I'm sure cron triggers those scripts (I've set it to confirm it my email) and I'm sure user 'php' has the proper rights to execute the scripts, but they fail..
w34_cron_addtoyear.php reports: Couldn not write headers to chartsmysql/2019_04.csv
w34_cron_empty.php does not clean result.csv and reports: success 1-2
The csv files as well as it's directory chartsmysql have write permissions to all users so that not the point either (otherwise none of the scripts would work).
The testscript w34_module_test.php does not give any clues.
In this case it is more of a "inspect" the data script.
The cron-jobs are not listed in the drop-downs on purpose.
You should test the cron-jobs using your browser
I included a "_test.php" script to force all scripts to display errors and debug data.
When I run the add-to-year job in the browser it works OK
https://pws.gravedecayband.com/_test.php?test=w34_cron_addtoyear.phpobject(mysqli_result)#2 (5) {
["current_field"]=>
int(0)
["field_count"]=>
int(12)
["lengths"]=>
NULL
["num_rows"]=>
int(1)
["type"]=>
int(0)
}
string(77) "2019-04-17 09:30:02,12.0,8.0,3.00,1.00,0.00,6.0,9.0,130.00,1022.35,1021.33,0,"
success
w34_cron_addtoyear.php (28) version =>w34_cron_addtoyear.php|00|2018-12-29|
I ran it twice and both data-lines are in the .CSV files for this year and this month.
contents of "./chartsmysql/2019.csv", processed as filetype "text file"
Filetime (UTC): 2019-04-17T07:40:17+00:00 which an age of 0 hrs 00 min 13 seconds
Unprocessed first 50 characters of the file :2019-04-17 09:30:02,12.0,8.0,3.00,1.00,0.00,6.0,9.
Contents processed:
2019-04-17 09:30:02,12.0,8.0,3.00,1.00,0.00,6.0,9.0,130.00,1022.35,1021.33,0,
2019-04-17 09:40:02,12.0,8.0,3.00,1.00,0.00,6.0,9.0,136.00,1022.35,1021.33,0,
So please check if the permissions for the cron-jobs are set correctly.
The best way is to run them form an external cron-server.
Your webserver thinks than that they are started from a browser by a human.
But again, the SQL part seems not to be the problem.
The reading of the daily .CSV => seems OK
Writing to the yearly/monthly .CSV seems to be not allowed.
Wim