Pre: a curl script collects information on my heating/cooling system and inserts into a mysql DB.
A Phplot web script on a Fedora box runs fine. Copied to a new Raspberry Pi - when run as a web app says "DrawGraph(): No data array". But if I run from the cmd line "php furnace.php > furn.png" and then http localhost/furn.png I get a perfect graph. Testing indicates that $data doesen't grow under apache. phpinfo() GD look the same as the Fedora box.
include phplot.php
mysql_connect
select a, b, c, d from furnace ( about 1100 data rows )
while ($a2 = mysqli_fetch_row
$data[] = $a2;
Pre: a curl script collects information on my heating/cooling system and inserts into a mysql DB.
A Phplot web script on a Fedora box runs fine. Copied to a new Raspberry Pi - when run as a web app says "DrawGraph(): No data array". But if I run from the cmd line "php furnace.php > furn.png" and then http localhost/furn.png I get a perfect graph. Testing indicates that $data doesen't grow under apache. phpinfo() GD look the same as the Fedora box.
include phplot.php
mysql_connect
select a, b, c, d from furnace ( about 1100 data rows )
while ($a2 = mysqli_fetch_row
$data[] = $a2;
$plot = new...
$plot->SetDataValues($data);
$plot->DrawGraph();
Am I missing something in apache config? Thanks for any help.
Last edit: chuck lidderdale 2020-05-02
Problem solved - seems the latested RasPi Buster comes with Mysql pre-installed and when you do the LAMP install as seen on the the web - FUBAR!.