Menu

RasPi data/nodata

2020-05-02
2020-05-04
  • chuck lidderdale

    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
  • chuck lidderdale

    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!.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.